diff --git a/src/app/features/settings-dropdown/settings-dropdown.tsx b/src/app/features/settings-dropdown/settings-dropdown.tsx index 1188917ce20..e250fa6d166 100644 --- a/src/app/features/settings-dropdown/settings-dropdown.tsx +++ b/src/app/features/settings-dropdown/settings-dropdown.tsx @@ -5,6 +5,7 @@ import { useLocation, useNavigate } from 'react-router-dom'; import { Box, Flex, SlideFade, Stack, color } from '@stacks/ui'; import { SettingsSelectors } from '@tests/selectors/settings.selectors'; +import { IS_PROD_ENV } from '@shared/environment'; import { RouteUrls } from '@shared/route-urls'; import { useAnalytics } from '@app/common/hooks/analytics/use-analytics'; @@ -166,6 +167,15 @@ export function SettingsDropdown() { Lock )} + {!IS_PROD_ENV && ( + { + navigate(RouteUrls.Sandbox); + })} + > + Sandbox + + )} diff --git a/src/app/pages/sandbox/sandbox-buttons.tsx b/src/app/pages/sandbox/sandbox-buttons.tsx new file mode 100644 index 00000000000..685525bce13 --- /dev/null +++ b/src/app/pages/sandbox/sandbox-buttons.tsx @@ -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 ( + + {variants.map((variant: any) => ( + + variant: {variant} + Button + + ))} + + ); +} diff --git a/src/app/pages/sandbox/sandbox-container.tsx b/src/app/pages/sandbox/sandbox-container.tsx new file mode 100644 index 00000000000..436eb335aef --- /dev/null +++ b/src/app/pages/sandbox/sandbox-container.tsx @@ -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(, true); + + return ( + + + + ); +} diff --git a/src/app/pages/sandbox/sandbox-elements.tsx b/src/app/pages/sandbox/sandbox-elements.tsx new file mode 100644 index 00000000000..1d3e9ff627d --- /dev/null +++ b/src/app/pages/sandbox/sandbox-elements.tsx @@ -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: , + title: 'Buttons', + }, + { + path: '/sandbox/typography', + element: , + title: 'Typography', + }, +]; + +export function SandboxElements() { + return ( + + {sandboxRoutes.map(route => ( + + {route.title} + + ))} + + ); +} diff --git a/src/app/pages/sandbox/sandbox-typography.tsx b/src/app/pages/sandbox/sandbox-typography.tsx new file mode 100644 index 00000000000..100afd49eb8 --- /dev/null +++ b/src/app/pages/sandbox/sandbox-typography.tsx @@ -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 ( + + {textVariants.map((variant: any) => ( + + variant: {variant} + Button + + ))} + + ); +} diff --git a/src/app/pages/sandbox/sandbox.tsx b/src/app/pages/sandbox/sandbox.tsx new file mode 100644 index 00000000000..687b7dbf6f4 --- /dev/null +++ b/src/app/pages/sandbox/sandbox.tsx @@ -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 = ( + }> + } /> + } /> + } /> + +); diff --git a/src/app/routes/app-routes.tsx b/src/app/routes/app-routes.tsx index 973b01592e4..bf3caf339bb 100644 --- a/src/app/routes/app-routes.tsx +++ b/src/app/routes/app-routes.tsx @@ -36,6 +36,7 @@ import { WelcomePage } from '@app/pages/onboarding/welcome/welcome'; import { ReceiveStxModal } from '@app/pages/receive/receive-stx'; import { RequestError } from '@app/pages/request-error/request-error'; import { RpcSignStacksTransaction } from '@app/pages/rpc-sign-stacks-transaction/rpc-sign-stacks-transaction'; +import { sandboxRoutes } from '@app/pages/sandbox/sandbox'; import { BroadcastError } from '@app/pages/send/broadcast-error/broadcast-error'; import { LockBitcoinSummary } from '@app/pages/send/locked-bitcoin-summary/locked-bitcoin-summary'; import { sendCryptoAssetFormRoutes } from '@app/pages/send/send-crypto-asset-form/send-crypto-asset-form.routes'; @@ -186,6 +187,7 @@ function useAppRoutes() { {sendCryptoAssetFormRoutes} + {sandboxRoutes}