/** @jsxRuntime classic */ /** @jsx jsx */ import { Fragment, useState } from 'react'; import { jsx } from '@emotion/react'; import { CodeWindow, WindowWrapper, WindowL, WindowR } from '../components/content/CodeWindow'; import { GitHubButton } from '../components/primitives/GitHubButton'; import { COLORS, TYPESCALE, TYPE, SPACE } from '../lib/TOKENS'; import { Highlight } from '../components/primitives/Highlight'; import { styleMap, Type } from '../components/primitives/Type'; import { InlineCode } from '../components/primitives/Code'; import { Status } from '../components/primitives/Status'; import { Button } from '../components/primitives/Button'; import { Alert } from '../components/primitives/Alert'; import { Badge } from '../components/primitives/Badge'; import { Emoji } from '../components/primitives/Emoji'; import { Stack } from '../components/primitives/Stack'; import { Field } from '../components/primitives/Field'; import { Well } from '../components/primitives/Well'; import * as allIcons from '../components/icons'; import { Page } from '../components/Page'; const EXCEPT_ICONS = ['FrontEndLogos', 'ClientLogos']; function Divider() { return (
); } function Box() { return (
); } type SwatchProps = { name?: string; color?: string; gradient?: { grad1: string; grad2: string }; }; function Swatch({ name, color, gradient }: SwatchProps) { return (
{name}
); } export default function DS() { const [icon, setIcon] = useState(null); let firstGrad: string; return ( Design System Contents
  • Colors
  • Font sizes
  • Font stacks
  • Spaces
  • Type
  • Components
Colors light
{Object.entries(COLORS.light) .filter(([name]) => name !== '--theme') .filter(([name]) => !name.startsWith('--grad')) .map(([name, color]) => ( ))} {Object.entries(COLORS.light) .filter(([name]) => name.startsWith('--grad')) .map(([name, color]) => { if (name.endsWith('-2')) { return ( ); } else { firstGrad = color; } })}
Colors dark
{Object.entries(COLORS.dark) .filter(([name]) => name !== '--theme') .filter(([name]) => !name.startsWith('--grad')) .map(([name, color]) => ( ))} {Object.entries(COLORS.dark) .filter(([name]) => name.startsWith('--grad')) .map(([name, color]) => { if (name.endsWith('-2')) { return ( ); } else { firstGrad = color; } })}
Font sizes {Object.entries(TYPESCALE).map(([name]) => ( {name} ))} Font stacks {Object.entries(TYPE).map(([name, stack]) => ( {name} aAgGzZij
{stack}
))} Space {Object.entries(SPACE).map(([name, size]) => ( {name} - {size}
))} Type {(Object.keys(styleMap) as Array).map(style => ( Type {style} ))} Components InlineCode this.is('code') Status
Emoji Stack
Alert Neutral alert Warning alert Warning alert Error alert Well Learn how to use our CLI to get Keystone’s Admin UI and GraphQL API running in a new local project folder. Learn how to run Keystone in the same folder as your frontend code and commit everything to Git. You end up with a queryable GraphQL endpoint running live on Vercel for free. Learn how to use our CLI to get Keystone’s Admin UI and GraphQL API running in a new local project folder. Learn how to run Keystone in the same folder as your frontend code and commit everything to Git. You end up with a queryable GraphQL endpoint running live on Vercel for free. Learn how to use our CLI to get Keystone’s Admin UI and GraphQL API running in a new local project folder. Learn how to run Keystone in the same folder as your frontend code and commit everything to Git. You end up with a queryable GraphQL endpoint running live on Vercel for free. Learn how to use our CLI to get Keystone’s Admin UI and GraphQL API running in a new local project folder. Learn how to run Keystone in the same folder as your frontend code and commit everything to Git. You end up with a queryable GraphQL endpoint running live on Vercel for free. Button
Field GitHubButton Icons Set icons to:
{Object.entries(allIcons) .filter(([i]) => !EXCEPT_ICONS.includes(i)) .map(([key, Icon]) => (
{key}
))}
Badge
New New New New
CodeWindow {`Some code... Some code... Some code... Some code... Some code... Some code... Some code... Some code... Some code... Some code... Some code... Some code... Some code... Some code... Some code... Some code... Some code... Some code... Some code... Some code... Some code...`} {`Some code... Some code... Some code... Some code... Some code... Some code... Some code... Some code... Some code... Some code... Some code... Some code... Some code...`} {`{ posts(take: 2, where: { title: { contains: "content" } }) { title author { name } } }`} {`{ "data": { "posts": [ { "title": "How structured content gives you superpowers", "author": { "name": "Tim" } }, { "title": "Content Management for the Design System generation", "author": { "name": "Lauren" } } ] } }`} Highlight Highlighting a part of some text Highlighting a part of some text Highlighting a part Highlighting a part of some text Highlighting a part of some text ); }