-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: migrate existing sandbox to storybook
- Loading branch information
Showing
44 changed files
with
425 additions
and
757 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
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,38 @@ | ||
/* eslint-disable filename-rules/match */ | ||
|
||
import type { Meta, StoryObj } from '@storybook/react'; | ||
import { ScrollView, View } from 'react-native'; | ||
|
||
import { Box, Text } from '$shared/uiKit/primitives'; | ||
|
||
import type { Colors as ThemeColors } from '../colors'; | ||
import { theme } from '../theme'; | ||
|
||
const meta = { | ||
title: 'Theme/Colors', | ||
component: View, | ||
render: () => ( | ||
<ScrollView> | ||
<Box p="spacing_16"> | ||
{(Object.keys(theme.colors) as ThemeColors[]).map((color) => ( | ||
<Box key={color} alignItems="center" mb="spacing_24"> | ||
<Text pb="spacing_8">{color}</Text> | ||
|
||
<Box | ||
aspectRatio={1} | ||
bg={color} | ||
borderRadius="radius_8" | ||
width={100} | ||
/> | ||
</Box> | ||
))} | ||
</Box> | ||
</ScrollView> | ||
), | ||
} satisfies Meta<typeof View>; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof meta>; | ||
|
||
export const Colors: Story = {}; |
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,29 @@ | ||
/* eslint-disable filename-rules/match */ | ||
|
||
import type { Meta, StoryObj } from '@storybook/react'; | ||
import { View } from 'react-native'; | ||
|
||
import { Box, Text } from '$shared/uiKit/primitives'; | ||
|
||
import type { FontSizes as ThemeFontSizes } from '../fonts'; | ||
import { fontSizes } from '../fonts'; | ||
|
||
const meta = { | ||
title: 'Theme/FontSizes', | ||
component: View, | ||
render: () => ( | ||
<Box p="spacing_16"> | ||
{(Object.keys(fontSizes) as ThemeFontSizes[]).map((size) => ( | ||
<Text key={size} mb="spacing_24" variant={size}> | ||
{`This is a ${size} text`} | ||
</Text> | ||
))} | ||
</Box> | ||
), | ||
} satisfies Meta<typeof View>; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof meta>; | ||
|
||
export const FontSizes: Story = {}; |
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,31 @@ | ||
/* eslint-disable filename-rules/match */ | ||
|
||
import type { Meta, StoryObj } from '@storybook/react'; | ||
import { View } from 'react-native'; | ||
|
||
import { Box, Text } from '$shared/uiKit/primitives'; | ||
|
||
import type { BorderRadii } from '../radius'; | ||
import { theme } from '../theme'; | ||
|
||
const meta = { | ||
title: 'Theme/Radiuses', | ||
component: View, | ||
render: () => ( | ||
<Box p="spacing_16"> | ||
{(Object.keys(theme.borderRadii) as BorderRadii[]).map((radius) => ( | ||
<Box key={radius} alignItems="center" mb="spacing_24"> | ||
<Text mb="spacing_8">{radius}</Text> | ||
|
||
<Box bg="bg_focus" borderRadius={radius} height={100} width={100} /> | ||
</Box> | ||
))} | ||
</Box> | ||
), | ||
} satisfies Meta<typeof View>; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof meta>; | ||
|
||
export const Radiuses: Story = {}; |
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,37 @@ | ||
/* eslint-disable filename-rules/match */ | ||
|
||
import type { Meta, StoryObj } from '@storybook/react'; | ||
import { Fragment } from 'react'; | ||
import { View } from 'react-native'; | ||
|
||
import { Box, Text } from '$shared/uiKit/primitives'; | ||
|
||
import { spacing, type Spacing as ThemeSpacing } from '../spacing'; | ||
import { theme } from '../theme'; | ||
|
||
const meta = { | ||
title: 'Theme/Spacing', | ||
component: View, | ||
render: () => ( | ||
<Box p="spacing_16"> | ||
{(Object.keys(theme.spacing) as ThemeSpacing[]).map((space) => ( | ||
<Fragment key={space}> | ||
<Text mb="spacing_8">{space}</Text> | ||
|
||
<Box | ||
bg="bg_focus" | ||
height={spacing[space]} | ||
mb="spacing_32" | ||
width="100%" | ||
/> | ||
</Fragment> | ||
))} | ||
</Box> | ||
), | ||
} satisfies Meta<typeof View>; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof meta>; | ||
|
||
export const Spacing: Story = {}; |
This file was deleted.
Oops, something went wrong.
23 changes: 0 additions & 23 deletions
23
src/features/sandbox/components/designSystem/Button.sandbox.tsx
This file was deleted.
Oops, something went wrong.
42 changes: 0 additions & 42 deletions
42
src/features/sandbox/components/designSystem/DesignSystem.sandbox.tsx
This file was deleted.
Oops, something went wrong.
26 changes: 0 additions & 26 deletions
26
src/features/sandbox/components/designSystem/Input.sandbox.tsx
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
src/features/sandbox/components/designSystem/Loader.sandbox.tsx
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.