├── .eslintignore ├── src ├── assets │ └── css │ │ └── tailwind.css ├── index.tsx └── components │ └── Button │ ├── index.tsx │ └── styles.ts ├── tailwind.config.js ├── types └── tailwind.macro │ └── index.d.ts ├── prettier.config.js ├── postcss.config.js ├── .editorconfig ├── stories └── Button.story.tsx ├── .storybook ├── config.js └── main.js ├── .gitignore ├── .eslintrc.json ├── README.md ├── package.json └── tsconfig.json /.eslintignore: -------------------------------------------------------------------------------- 1 | **/*.js 2 | node_modules 3 | dist 4 | build 5 | -------------------------------------------------------------------------------- /src/assets/css/tailwind.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | 3 | @tailwind components; 4 | 5 | @tailwind utilities; 6 | -------------------------------------------------------------------------------- /src/index.tsx: -------------------------------------------------------------------------------- 1 | import './assets/css/tailwind.css'; 2 | 3 | export { Button } from './components/Button'; 4 | -------------------------------------------------------------------------------- /tailwind.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | purge: [], 3 | theme: { 4 | extend: {}, 5 | }, 6 | variants: {}, 7 | plugins: [], 8 | } 9 | -------------------------------------------------------------------------------- /types/tailwind.macro/index.d.ts: -------------------------------------------------------------------------------- 1 | declare module "tailwind.macro" { 2 | export default function tw(string: TemplateStringsArray): string; 3 | } 4 | -------------------------------------------------------------------------------- /prettier.config.js: -------------------------------------------------------------------------------- 1 | //prettier-ignore 2 | module.exports = { 3 | trailingComma: "all", 4 | singleQuote: true, 5 | allowParens: "avoid", 6 | }; 7 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: [ 3 | require("postcss-import"), 4 | require("tailwindcss"), 5 | require("autoprefixer"), 6 | ], 7 | }; 8 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | charset = utf-8 7 | trim_trailing_whitespace = true 8 | insert_final_newline = true 9 | end_of_line = lf -------------------------------------------------------------------------------- /stories/Button.story.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { storiesOf } from '@storybook/react'; 3 | 4 | import { Button } from '../src'; 5 | 6 | storiesOf('Button', module).add('Default', () =>