Skip to content

Commit

Permalink
Merge pull request #429 from pixiv/mimo/tailwind-config-documents-scr…
Browse files Browse the repository at this point in the history
…eens

tailwind-configのbreak points (screen) docs追加
  • Loading branch information
mimokmt authored Jan 16, 2024
2 parents e0ab41d + 057afb7 commit 1737e85
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/src/components/NavList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ const tailwindConfigList: ListItem[] = [
text: 'Spacing',
href: '/@charcoal-ui/tailwind-config/spacing',
},
{
text: 'Break points',
href: '/@charcoal-ui/tailwind-config/screens',
},
]

const tailwindDiffList: ListItem[] = [
Expand Down
24 changes: 24 additions & 0 deletions docs/src/components/tailwind-config/screens/Screens.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { config } from '@charcoal-ui/tailwind-config'

const {
theme: { screens },
} = config

export const Screens: React.FC = () => {
return (
<div className="space-y-40">
{Object.entries(screens!!).map(
([screenName, value]) =>
typeof value === 'string' && (
<div key={screenName}>
<p className="typography-14 text-text2">{screenName}</p>
<div className="bg-surface4 h-64" style={{ width: value }}></div>
<p className="typography-12 text-text3">
@media (<span className="text-text2">min-width: {value}</span>)
</p>
</div>
)
)}
</div>
)
}
9 changes: 9 additions & 0 deletions docs/src/pages/@charcoal-ui/tailwind-config/screens.page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { NextPage } from 'next'
import { Screens } from '../../../components/tailwind-config/screens/Screens'

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

0 comments on commit 1737e85

Please sign in to comment.