diff --git a/README.md b/README.md
index 174802f..6ce4d92 100644
--- a/README.md
+++ b/README.md
@@ -14,27 +14,24 @@ or
yarn add @gryt/ui @tailwindcss/typography tailwind daisyui
```
-## Usage
-
-### Button
-
-```tsx
-// somePage.tsx
-import React, { Component } from 'react'
+### Tailwind preset
-import Button from '@gryt/ui'
+```ts
+// tailwind.config.js
-class Example extends Component {
- render() {
- return
- }
+module.exports = {
+ presets: [
+ require('@gryt/ui/tailwind')
+ ],
+ // ...
}
```
-### Add styling (including tailwind config)
+### Styling
```tsx
// _app.tsx
+
import { AppProps } from 'next/app';
import "@gryt/ui/src/styles/globals.scss";
@@ -43,6 +40,26 @@ function MyApp({ Component, pageProps }: AppProps<{ initialSession: Session }>)
}
```
+## Usage
+
+### Button
+
+```tsx
+// somepage.tsx
+
+import React, { Component } from 'react'
+import Button from '@gryt/ui'
+
+export default function SomePage() {
+ return (
+
+
Welcome!
+
+
+ );
+}
+```
+
## License
MIT © [Gryt-chat](https://github.com/Gryt-chat)
diff --git a/src/styles/globals.scss b/style.scss
similarity index 98%
rename from src/styles/globals.scss
rename to style.scss
index ed2eb81..0d2c181 100644
--- a/src/styles/globals.scss
+++ b/style.scss
@@ -1,5 +1,3 @@
-@config "./tailwind.js";
-
@tailwind base;
@tailwind components;
@tailwind utilities;
diff --git a/src/styles/tailwind.js b/tailwind.js
similarity index 100%
rename from src/styles/tailwind.js
rename to tailwind.js
diff --git a/tsconfig.json b/tsconfig.json
index 66e34d8..99f779f 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -2,10 +2,7 @@
"compilerOptions": {
"outDir": "dist",
"module": "esnext",
- "lib": [
- "dom",
- "esnext"
- ],
+ "lib": ["dom", "esnext"],
"moduleResolution": "node",
"jsx": "react",
"sourceMap": true,
@@ -28,12 +25,6 @@
"isolatedModules": true,
"noEmit": true
},
- "include": [
- "src"
- ],
- "exclude": [
- "node_modules",
- "dist",
- "example"
- ]
+ "include": ["src", "tailwind.js", "tailwind.js"],
+ "exclude": ["node_modules", "dist", "example"]
}