Skip to content

Commit

Permalink
Update structure
Browse files Browse the repository at this point in the history
  • Loading branch information
sivert-io committed Mar 15, 2023
1 parent 067a265 commit 6dc36a3
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 27 deletions.
43 changes: 30 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <Button>Click me!</Button>
}
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";

Expand All @@ -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 (
<div>
<h1 className="text-2xl font-bold text-primary">Welcome!</h1>
<Button>Click me!</Button>
</div>
);
}
```

## License

MIT © [Gryt-chat](https://github.com/Gryt-chat)
2 changes: 0 additions & 2 deletions src/styles/globals.scss → style.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@config "./tailwind.js";

@tailwind base;
@tailwind components;
@tailwind utilities;
Expand Down
File renamed without changes.
15 changes: 3 additions & 12 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
"compilerOptions": {
"outDir": "dist",
"module": "esnext",
"lib": [
"dom",
"esnext"
],
"lib": ["dom", "esnext"],
"moduleResolution": "node",
"jsx": "react",
"sourceMap": true,
Expand All @@ -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"]
}

0 comments on commit 6dc36a3

Please sign in to comment.