-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
190868a
commit 80b73a3
Showing
9 changed files
with
115 additions
and
0 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,18 @@ | ||
import { Flex, Stack } from 'leather-styles/jsx'; | ||
|
||
import { LeatherButton } from '@app/components/button/button'; | ||
|
||
const variants = ['solid', 'outline', 'ghost', 'link', 'text']; | ||
|
||
export function SandboxButtons() { | ||
return ( | ||
<Stack gap="space.07"> | ||
{variants.map((variant: any) => ( | ||
<Flex alignItems="center" gap="space.03" key={variant}> | ||
variant: {variant} | ||
<LeatherButton variant={variant}>Button</LeatherButton> | ||
</Flex> | ||
))} | ||
</Stack> | ||
); | ||
} |
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,16 @@ | ||
import { Outlet } from 'react-router-dom'; | ||
|
||
import { Stack } from 'leather-styles/jsx'; | ||
|
||
import { useRouteHeader } from '@app/common/hooks/use-route-header'; | ||
import { ModalHeader } from '@app/components/modal-header'; | ||
|
||
export function SandboxContainer() { | ||
useRouteHeader(<ModalHeader hideActions defaultGoBack title="Sandbox" />, true); | ||
|
||
return ( | ||
<Stack> | ||
<Outlet /> | ||
</Stack> | ||
); | ||
} |
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 @@ | ||
import { Link } from 'react-router-dom'; | ||
|
||
import { Stack, styled } from 'leather-styles/jsx'; | ||
|
||
import { SandboxButtons } from './sandbox-buttons'; | ||
import { SandboxTypography } from './sandbox-typography'; | ||
|
||
const sandboxRoutes = [ | ||
{ | ||
path: '/sandbox/buttons', | ||
element: <SandboxButtons />, | ||
title: 'Buttons', | ||
}, | ||
{ | ||
path: '/sandbox/typography', | ||
element: <SandboxTypography />, | ||
title: 'Typography', | ||
}, | ||
]; | ||
|
||
export function SandboxElements() { | ||
return ( | ||
<Stack display="flex" width="100%"> | ||
{sandboxRoutes.map(route => ( | ||
<Link key={route.path} to={route.path}> | ||
<styled.span textDecoration="underline">{route.title}</styled.span> | ||
</Link> | ||
))} | ||
</Stack> | ||
); | ||
} |
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,16 @@ | ||
import { Flex, Stack, styled } from 'leather-styles/jsx'; | ||
|
||
const textVariants = ['label.01', 'label.02', 'label.03', 'heading.01', 'heading.02', 'heading.03']; | ||
|
||
export function SandboxTypography() { | ||
return ( | ||
<Stack gap="space.07"> | ||
{textVariants.map((variant: any) => ( | ||
<Flex alignItems="center" gap="space.03" key={variant}> | ||
variant: {variant} | ||
<styled.span textStyle={variant}>Button</styled.span> | ||
</Flex> | ||
))} | ||
</Stack> | ||
); | ||
} |
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,16 @@ | ||
import { Route } from 'react-router-dom'; | ||
|
||
import { RouteUrls } from '@shared/route-urls'; | ||
|
||
import { SandboxButtons } from './sandbox-buttons'; | ||
import { SandboxContainer } from './sandbox-container'; | ||
import { SandboxElements } from './sandbox-elements'; | ||
import { SandboxTypography } from './sandbox-typography'; | ||
|
||
export const sandboxRoutes = ( | ||
<Route element={<SandboxContainer />}> | ||
<Route path={RouteUrls.Sandbox} element={<SandboxElements />} /> | ||
<Route path={RouteUrls.SandboxButtons} element={<SandboxButtons />} /> | ||
<Route path={RouteUrls.SandboxTypography} element={<SandboxTypography />} /> | ||
</Route> | ||
); |
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