This repository has been archived by the owner on Dec 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'sor4chi/strict-auth-env' of https://github.com/saitamau…
…-maximum/meline into sor4chi/strict-auth-env
- Loading branch information
Showing
4 changed files
with
109 additions
and
2 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,28 @@ | ||
import "../global.css"; | ||
import { vars } from "../theme.css"; | ||
|
||
const styles = { | ||
background: vars.color.gray[1], | ||
color: vars.color.gray[12], | ||
padding: "16px", | ||
border: `1px solid ${vars.color.gray[6]}`, | ||
borderRadius: "8px", | ||
width: "fit-content", | ||
}; | ||
|
||
const LightWrapper = ({ children }: { children: React.ReactNode }) => ( | ||
<div className="light" style={styles}> | ||
{children} | ||
</div> | ||
); | ||
|
||
const DarkWrapper = ({ children }: { children: React.ReactNode }) => ( | ||
<div className="dark" style={styles}> | ||
{children} | ||
</div> | ||
); | ||
|
||
export const Theme = { | ||
Light: LightWrapper, | ||
Dark: DarkWrapper, | ||
}; |
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,65 @@ | ||
import type { Meta } from "@storybook/react"; | ||
import { vars } from "../theme.css"; | ||
import { Theme } from "./Theme"; | ||
|
||
const meta = { | ||
title: "Styles/Color Tokens", | ||
} satisfies Meta; | ||
|
||
export default meta; | ||
|
||
const ColorTokens = () => ( | ||
<> | ||
<h1>Color Tokens</h1> | ||
<div | ||
style={{ | ||
display: "flex", | ||
gap: "32px", | ||
padding: "32px", | ||
}} | ||
> | ||
{Object.entries(vars.color.gray).map(([key, value]) => ( | ||
<div | ||
key={key} | ||
style={{ | ||
display: "flex", | ||
flexDirection: "column", | ||
alignItems: "center", | ||
gap: "12px", | ||
}} | ||
> | ||
<div | ||
key={key} | ||
style={{ | ||
backgroundColor: value, | ||
height: "48px", | ||
width: "48px", | ||
borderRadius: "50%", | ||
border: `1px solid ${vars.color.gray[6]}`, | ||
}} | ||
/> | ||
<code | ||
style={{ | ||
fontSize: "0.75rem", | ||
color: vars.color.gray[12], | ||
}} | ||
> | ||
Gray {key} | ||
</code> | ||
</div> | ||
))} | ||
</div> | ||
</> | ||
); | ||
|
||
export const Light = () => ( | ||
<Theme.Light> | ||
<ColorTokens /> | ||
</Theme.Light> | ||
); | ||
|
||
export const Dark = () => ( | ||
<Theme.Dark> | ||
<ColorTokens /> | ||
</Theme.Dark> | ||
); |
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