-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #428 from pixiv/mimo/tailwind-config-spacing
tailwind-configのspacing docs追加
- Loading branch information
Showing
3 changed files
with
37 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |