Skip to content

Commit

Permalink
feat: add tailwind-config spacing docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mimokmt committed Dec 18, 2023
1 parent 5bdc1e8 commit 6434078
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/src/components/NavList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,20 @@ const themeList: ListItem[] = [
href: '/@charcoal-ui/theme/colors',
},
]
const tailwindConfigList: ListItem[] = [
{
text: 'クイックスタート',
href: '/@charcoal-ui/tailwind-config/quickstart',
},
{
text: 'カスタマイズする',
href: '/@charcoal-ui/tailwind-config/customize',
},
{
text: 'Spacing',
href: '/@charcoal-ui/tailwind-config/spacing',
},
]

export const NavList: FC<{ className?: string }> = (props) => {
const router = useRouter()
Expand Down
20 changes: 20 additions & 0 deletions docs/src/components/tailwind-config/spacing/Spacing.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { config } from '@charcoal-ui/tailwind-config'

const {
theme: { spacing },
} = config

export const Spacing: React.FC = () => {
return (
<div className="space-y-40">
{Object.keys(spacing!!).map((space) => (
<div key={space}>
<h3 className="typography-16 my-8 text-text2">p-{space}</h3>
<div className={`bg-surface3 p-${space} w-[min-content]`}>
<div className="bg-brand h-40" style={{ width: '40px' }}></div>
</div>
</div>
))}
</div>
)
}
9 changes: 9 additions & 0 deletions docs/src/pages/@charcoal-ui/tailwind-config/spacing.page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { NextPage } from 'next'
import { Spacing } from '../../../components/tailwind-config/spacing/Spacing'

const SpacingPage: NextPage = () => (
<div className="w-full m-16">
<Spacing />
</div>
)
export default SpacingPage

0 comments on commit 6434078

Please sign in to comment.