-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b959ff7
commit df3674e
Showing
27 changed files
with
1,577 additions
and
1,578 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,13 @@ | ||
import React from "react"; | ||
import "../src/index.css" | ||
import "../src/index.css"; | ||
|
||
import type { GlobalProvider } from "@ladle/react"; | ||
|
||
export const Provider: GlobalProvider = ({ | ||
children, | ||
globalState, | ||
}) => { | ||
// Make components that use `className="dark:underline"` dark mode compatible | ||
const theme = globalState.theme; | ||
if (theme === 'dark') { | ||
return ( | ||
<div className="dark text-white"> | ||
{children} | ||
</div> | ||
) | ||
} | ||
return children; | ||
}; | ||
export const Provider: GlobalProvider = ({ children, globalState }) => { | ||
// Make components that use `className="dark:underline"` dark mode compatible | ||
const theme = globalState.theme; | ||
if (theme === "dark") { | ||
return <div className="dark text-white">{children}</div>; | ||
} | ||
return children; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/** @type {import('@ladle/react').UserConfig} */ | ||
export default { | ||
defaultStory: "index--readme", | ||
outDir: "docs", | ||
base: process.env.CI ? "/haddock3-ui/" : "/", | ||
}; | ||
defaultStory: "index--readme", | ||
outDir: "docs", | ||
base: process.env.CI ? "/haddock3-ui/" : "/", | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,72 @@ | ||
{ | ||
"name": "@i-vresse/haddock3-ui", | ||
"version": "0.1.4", | ||
"type": "module", | ||
"private": false, | ||
"sideEffects": false, | ||
"license": "Apache-2.0", | ||
"homepage": "https://github.com/i-VRESSE/haddock3-ui#readme", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/i-VRESSE/haddock3-ui.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/i-VRESSE/haddock3-ui/issues" | ||
}, | ||
"scripts": { | ||
"dev": "ladle serve", | ||
"build": "tsc -b && vite build", | ||
"build:docs": "ladle build", | ||
"preview": "ladle preview", | ||
"lint": "biome lint", | ||
"format": "biome check --write", | ||
"prepublishOnly": "pnpm build" | ||
}, | ||
"dependencies": { | ||
"clsx": "^2.1.1", | ||
"ngl": "^2.3.1", | ||
"tailwind-merge": "^2.4.0" | ||
}, | ||
"peerDependencies": { | ||
"react": "^18.3.1", | ||
"react-dom": "^18.3.1" | ||
}, | ||
"devDependencies": { | ||
"@biomejs/biome": "1.8.3", | ||
"@ladle/react": "^4.1.0", | ||
"@tailwindcss/typography": "^0.5.13", | ||
"@types/node": "^20.14.12", | ||
"@types/react": "^18.3.3", | ||
"@types/react-dom": "^18.3.0", | ||
"@typescript-eslint/eslint-plugin": "^7.15.0", | ||
"@typescript-eslint/parser": "^7.15.0", | ||
"@vitejs/plugin-react": "^4.3.1", | ||
"autoprefixer": "^10.4.19", | ||
"postcss": "^8.4.40", | ||
"tailwindcss": "^3.4.6", | ||
"typescript": "^5.2.2", | ||
"vite": "^5.3.4", | ||
"vite-plugin-dts": "^3.9.1" | ||
}, | ||
"files": [ | ||
"dist" | ||
], | ||
"module": "dist/index.js", | ||
"types": "./dist/src/index.d.ts", | ||
"exports": { | ||
".": { | ||
"module": "./dist/index.mjs", | ||
"import": { | ||
"types": "./dist/src/index.d.ts", | ||
"default": "./dist/index.js" | ||
}, | ||
"default": "./dist/index.js" | ||
}, | ||
"./package.json": "./package.json" | ||
}, | ||
"packageManager": "[email protected]", | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"engines": { | ||
"node": ">=20" | ||
} | ||
"name": "@i-vresse/haddock3-ui", | ||
"version": "0.1.4", | ||
"type": "module", | ||
"private": false, | ||
"sideEffects": false, | ||
"license": "Apache-2.0", | ||
"homepage": "https://github.com/i-VRESSE/haddock3-ui#readme", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/i-VRESSE/haddock3-ui.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/i-VRESSE/haddock3-ui/issues" | ||
}, | ||
"scripts": { | ||
"dev": "ladle serve", | ||
"build": "tsc -b && vite build", | ||
"build:docs": "ladle build", | ||
"preview": "ladle preview", | ||
"lint": "biome lint", | ||
"format": "biome check --write", | ||
"prepublishOnly": "pnpm build" | ||
}, | ||
"dependencies": { | ||
"clsx": "^2.1.1", | ||
"ngl": "^2.3.1", | ||
"tailwind-merge": "^2.4.0" | ||
}, | ||
"peerDependencies": { | ||
"react": "^18.3.1", | ||
"react-dom": "^18.3.1" | ||
}, | ||
"devDependencies": { | ||
"@biomejs/biome": "1.8.3", | ||
"@ladle/react": "^4.1.0", | ||
"@tailwindcss/typography": "^0.5.13", | ||
"@types/node": "^20.14.12", | ||
"@types/react": "^18.3.3", | ||
"@types/react-dom": "^18.3.0", | ||
"@typescript-eslint/eslint-plugin": "^7.15.0", | ||
"@typescript-eslint/parser": "^7.15.0", | ||
"@vitejs/plugin-react": "^4.3.1", | ||
"autoprefixer": "^10.4.19", | ||
"postcss": "^8.4.40", | ||
"tailwindcss": "^3.4.6", | ||
"typescript": "^5.2.2", | ||
"vite": "^5.3.4", | ||
"vite-plugin-dts": "^3.9.1" | ||
}, | ||
"files": ["dist"], | ||
"module": "dist/index.js", | ||
"types": "./dist/src/index.d.ts", | ||
"exports": { | ||
".": { | ||
"module": "./dist/index.mjs", | ||
"import": { | ||
"types": "./dist/src/index.d.ts", | ||
"default": "./dist/index.js" | ||
}, | ||
"default": "./dist/index.js" | ||
}, | ||
"./package.json": "./package.json" | ||
}, | ||
"packageManager": "[email protected]", | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"engines": { | ||
"node": ">=20" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
export default { | ||
plugins: { | ||
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
} | ||
plugins: { | ||
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
export function CopyToClipBoardIcon() { | ||
return ( | ||
<svg | ||
width="14" | ||
height="14" | ||
viewBox="0 0 14 15" | ||
fill="none" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<path | ||
fillRule="evenodd" | ||
clipRule="evenodd" | ||
d="M11.746.07A.5.5 0 0011.5.003h-6a.5.5 0 00-.5.5v2.5H.5a.5.5 0 00-.5.5v10a.5.5 0 00.5.5h8a.5.5 0 00.5-.5v-2.5h4.5a.5.5 0 00.5-.5v-8a.498.498 0 00-.15-.357L11.857.154a.506.506 0 00-.11-.085zM9 10.003h4v-7h-1.5a.5.5 0 01-.5-.5v-1.5H6v2h.5a.5.5 0 01.357.15L8.85 5.147c.093.09.15.217.15.357v4.5zm-8-6v9h7v-7H6.5a.5.5 0 01-.5-.5v-1.5H1z" | ||
fill="currentColor" | ||
></path> | ||
</svg> | ||
); | ||
return ( | ||
<svg | ||
width="14" | ||
height="14" | ||
viewBox="0 0 14 15" | ||
fill="none" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<path | ||
fillRule="evenodd" | ||
clipRule="evenodd" | ||
d="M11.746.07A.5.5 0 0011.5.003h-6a.5.5 0 00-.5.5v2.5H.5a.5.5 0 00-.5.5v10a.5.5 0 00.5.5h8a.5.5 0 00.5-.5v-2.5h4.5a.5.5 0 00.5-.5v-8a.498.498 0 00-.15-.357L11.857.154a.506.506 0 00-.11-.085zM9 10.003h4v-7h-1.5a.5.5 0 01-.5-.5v-1.5H6v2h.5a.5.5 0 01.357.15L8.85 5.147c.093.09.15.217.15.357v4.5zm-8-6v9h7v-7H6.5a.5.5 0 01-.5-.5v-1.5H1z" | ||
fill="currentColor" | ||
></path> | ||
</svg> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,17 @@ | ||
/** | ||
* Use me as a layout for your MDX files. | ||
* | ||
* | ||
* For example: | ||
* | ||
* | ||
* ```tsx | ||
* import {Layout} from "../MdxLayout"; | ||
* export default Layout | ||
* `` | ||
*/ | ||
export function Layout({children}: {children: React.ReactNode}) { | ||
return <main className="prose dark:prose-invert prose-pre:bg-inherit">{children}</main>; | ||
} | ||
export function Layout({ children }: { children: React.ReactNode }) { | ||
return ( | ||
<main className="prose dark:prose-invert prose-pre:bg-inherit"> | ||
{children} | ||
</main> | ||
); | ||
} |
Oops, something went wrong.