diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..f0eb61e --- /dev/null +++ b/.prettierrc @@ -0,0 +1,6 @@ +{ + "trailingComma": "es5", + "tabWidth": 2, + "semi": true, + "singleQuote": false +} diff --git a/README.md b/README.md index 0036f62..978c448 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,27 @@ # ink-kit Ink Kit + +## Install + +```bash +npm install @inkonchain/ink-kit +``` + +## Usage + +To use the components, you can import them directly: + +```tsx +import { Button } from "@inkonchain/ink-kit"; +``` + +To import the CSS, you can use the `style.css` export: + +```tsx +import "@inkonchain/ink-kit/style.css"; +``` + +## WIP Notice + +This is a work in progress, we are working on it! diff --git a/package.json b/package.json index 90d07aa..2a079e3 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,15 @@ "files": [ "/dist" ], + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.es.js", + "require": "./dist/index.cjs.js" + }, + "./style.css": "./dist/style.css", + "./tailwind.config.mjs": "./tailwind.config.mjs" + }, "scripts": { "build": "tsc && vite build", "storybook": "storybook dev -p 6006", @@ -17,7 +26,8 @@ "format": "prettier --write \"**/*.{ts,tsx,md,mdx,css,scss}\"", "format:check": "prettier --check \"**/*.{ts,tsx,md,mdx,css,scss}\"", "test": "playwright test", - "fix:all": "pnpm run lint:fix && pnpm run format" + "fix:all": "pnpm run lint:fix && pnpm run format", + "prepublish": "build" }, "keywords": [], "author": "", @@ -52,7 +62,9 @@ "vite-plugin-dts": "^4.3.0" }, "peerDependencies": { - "react": "^18" + "react": "^18", + "react-dom": "^18", + "tailwindcss": "^3" }, "dependencies": { "clsx": "^2.1.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 36f40c2..9ff4f8b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,6 +11,9 @@ importers: clsx: specifier: ^2.1.1 version: 2.1.1 + react-dom: + specifier: ^18 + version: 18.3.1(react@18.3.1) tailwind-merge: specifier: ^2.5.4 version: 2.5.4 diff --git a/src/components/Button/Button.tsx b/src/components/Button/Button.tsx index 63d9ef9..baa37f4 100644 --- a/src/components/Button/Button.tsx +++ b/src/components/Button/Button.tsx @@ -24,19 +24,20 @@ export const Button: React.FC = ({