Skip to content

Commit

Permalink
feat: add tailwindcss to docs/
Browse files Browse the repository at this point in the history
  • Loading branch information
mimokmt committed Dec 14, 2023
1 parent a5fd971 commit 0f734b6
Show file tree
Hide file tree
Showing 6 changed files with 1,277 additions and 25 deletions.
3 changes: 3 additions & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@
"@types/react": "18.0.27",
"@types/react-dom": "18.0.10",
"@types/styled-components": "^5.1.26",
"autoprefixer": "^10.4.16",
"eslint": "8.33.0",
"eslint-config-next": "13.1.6",
"postcss": "^8.4.32",
"tailwindcss": "^3.3.6",
"typescript": "^5.0.4"
},
"resolutions": {
Expand Down
6 changes: 6 additions & 0 deletions docs/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
3 changes: 3 additions & 0 deletions docs/src/global.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
1 change: 1 addition & 0 deletions docs/src/pages/_app.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { theme } from '../utils/theme'
import { AppProvider } from '../components/AppProvider'
import { SideMenuDiv } from '../components/SideMenuDiv'
import Head from 'next/head'
import '../global.css'

function MyApp({ Component, pageProps }: AppProps) {
return (
Expand Down
17 changes: 17 additions & 0 deletions docs/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const { light, dark } = require('@charcoal-ui/theme')
const { createTailwindConfig } = require('@charcoal-ui/tailwind-config')

/** @type {import('tailwindcss').Config} */
module.exports = {
content: ['./src/pages/**/*.tsx', './src/components/**/*.tsx'],
presets: [
createTailwindConfig({
version: 'v3',
theme: {
':root': light,
'[data-theme="dark"]': dark,
},
}),
],
safelist: [{ pattern: /.*/ }],
}
Loading

0 comments on commit 0f734b6

Please sign in to comment.