-
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 pull request #20 from cat-crosswalk/SSlime/decomposition-card
♻️ Card を border, shadow, border-radius に分解
- Loading branch information
Showing
7 changed files
with
102 additions
and
22 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,83 @@ | ||
import { Meta, ColorPalette, ColorItem } from "@storybook/blocks"; | ||
import { border, shadow, rounded } from "./index"; | ||
import styled from "@emotion/styled"; | ||
|
||
<Meta title="theme/Box" /> | ||
|
||
# Box | ||
|
||
## Rounded + Shadow + Border | ||
|
||
```ts | ||
const Box = styled.div` | ||
${border.default} | ||
${shadow.default} | ||
${rounded.default} | ||
`; | ||
``` | ||
|
||
export const Box1 = styled.div` | ||
${border.default} | ||
${shadow.default} | ||
${rounded.default} | ||
width: 300px; | ||
height: 100px; | ||
`; | ||
|
||
<Box1 /> | ||
|
||
## Shadow + Border | ||
|
||
```ts | ||
const Box = styled.div` | ||
${border.default} | ||
${shadow.default} | ||
`; | ||
``` | ||
|
||
export const Box2 = styled.div` | ||
${border.default} | ||
${shadow.default} | ||
width: 300px; | ||
height: 100px; | ||
`; | ||
|
||
<Box2 /> | ||
|
||
## Border + Rounded | ||
|
||
```ts | ||
const Box = styled.div` | ||
${border.default} | ||
${rounded.default} | ||
`; | ||
``` | ||
|
||
export const Box3 = styled.div` | ||
${border.default} | ||
${rounded.default} | ||
width: 300px; | ||
height: 100px; | ||
`; | ||
|
||
<Box3 /> | ||
|
||
## Border | ||
|
||
```ts | ||
const Box = styled.div` | ||
${border.default} | ||
`; | ||
``` | ||
|
||
export const Box4 = styled.div` | ||
${border.default} | ||
width: 300px; | ||
height: 100px; | ||
`; | ||
|
||
<Box4 /> |
This file was deleted.
Oops, something went wrong.
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,7 @@ | ||
import { colors } from "@/theme"; | ||
|
||
export default { | ||
default: { | ||
border: `2px solid ${colors.border.primary.default}`, | ||
}, | ||
} as const satisfies Record<string, React.CSSProperties>; |
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
export { default as colors } from "@/theme/colors"; | ||
export { default as rounded } from "@/theme/rounded"; | ||
export { default as typography } from "@/theme/typography"; | ||
export { default as card } from "@/theme/card"; | ||
export { default as shadow } from "@/theme/shadow"; | ||
export { default as border } from "@/theme/border"; |
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,5 @@ | ||
export default { | ||
default: { | ||
borderRadius: "3px", | ||
}, | ||
} as const satisfies Record<string, React.CSSProperties>; |
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