Skip to content

Commit

Permalink
Run Format
Browse files Browse the repository at this point in the history
  • Loading branch information
sverhoeven committed Jul 25, 2024
1 parent b959ff7 commit df3674e
Show file tree
Hide file tree
Showing 27 changed files with 1,577 additions and 1,578 deletions.
25 changes: 9 additions & 16 deletions .ladle/components.tsx
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;
};
8 changes: 4 additions & 4 deletions .ladle/config.mjs
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/" : "/",
};
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"organizeImports": { "enabled": true },
"vcs": {
"enabled": true,
"clientKind": "git",
"clientKind": "git",
"useIgnoreFile": true
},
"linter": {
Expand Down
142 changes: 70 additions & 72 deletions package.json
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"
}
}
10 changes: 5 additions & 5 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};
4 changes: 1 addition & 3 deletions src/CopyToClipBoardIcon.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@ import type { Story } from "@ladle/react";

import { CopyToClipBoardIcon } from "./CopyToClipBoardIcon.js";

export const Default: Story = () => (
<CopyToClipBoardIcon />
);
export const Default: Story = () => <CopyToClipBoardIcon />;
32 changes: 16 additions & 16 deletions src/CopyToClipBoardIcon.tsx
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>
);
}
14 changes: 9 additions & 5 deletions src/MdxLayout.tsx
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>
);
}
Loading

0 comments on commit df3674e

Please sign in to comment.