diff --git a/canon-docs/src/app/globals.css b/canon-docs/src/app/globals.css index de791f589a..ece334696b 100644 --- a/canon-docs/src/app/globals.css +++ b/canon-docs/src/app/globals.css @@ -4,6 +4,12 @@ body { background-color: var(--canon-background); color: var(--canon-text-primary); transition: background-color 0.2s ease-in-out; + + --docs-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, + 'Helvetica Neue', Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', + 'Segoe UI Symbol', 'Noto Color Emoji'; + + font-family: var(--docs-font); } iframe { diff --git a/canon-docs/src/components/Sidebar/Sidebar.module.css b/canon-docs/src/components/Sidebar/Sidebar.module.css index 1b9aa02424..6a5b94bed8 100644 --- a/canon-docs/src/components/Sidebar/Sidebar.module.css +++ b/canon-docs/src/components/Sidebar/Sidebar.module.css @@ -39,6 +39,13 @@ width: 100%; } +.sectionTitle { + font-family: var(--docs-font); + font-size: var(--canon-font-size-body); + font-weight: var(--canon-font-weight-bold); + padding: 12px 0; +} + .line { width: 100%; display: flex; @@ -58,3 +65,16 @@ .line.active { background-color: var(--canon-surface-2); } + +.lineTitle { + font-family: var(--docs-font); + font-size: var(--canon-font-size-body); + font-weight: var(--canon-font-weight-regular); + color: var(--canon-text-primary); +} + +.lineStatus { + font-family: var(--docs-font); + font-size: var(--canon-font-size-body); + color: var(--canon-text-secondary); +} diff --git a/canon-docs/src/components/Sidebar/docs.tsx b/canon-docs/src/components/Sidebar/docs.tsx index 0d83b9bb0f..13c1675c20 100644 --- a/canon-docs/src/components/Sidebar/docs.tsx +++ b/canon-docs/src/components/Sidebar/docs.tsx @@ -55,9 +55,7 @@ export const Docs = () => { return ( - - {section.title} - +
{section.title}
{section.content.map(item => { const isActive = pathname === `${section.url}/${item.slug}`; @@ -68,17 +66,14 @@ export const Docs = () => { key={item.slug} className={`${styles.line} ${isActive ? styles.active : ''}`} > - {item.title} - +
{item.title}
+
{item.status === 'alpha' && 'Alpha'} {item.status === 'beta' && 'Beta'} {item.status === 'inProgress' && 'In Progress'} {item.status === 'stable' && 'Stable'} {item.status === 'deprecated' && 'Deprecated'} - +
); })} diff --git a/canon-docs/src/components/Toolbar/nav.module.css b/canon-docs/src/components/Toolbar/nav.module.css index 6c1b8e62d4..a7fe11e8ad 100644 --- a/canon-docs/src/components/Toolbar/nav.module.css +++ b/canon-docs/src/components/Toolbar/nav.module.css @@ -19,6 +19,7 @@ .tab { all: unset; height: 60px; + font-family: var(--docs-font); color: var(--canon-text-secondary); font-size: var(--canon-font-size-body); font-weight: var(--canon-font-weight-bold); diff --git a/canon-docs/src/mdx-components.modules.css b/canon-docs/src/mdx-components.modules.css new file mode 100644 index 0000000000..5550a859df --- /dev/null +++ b/canon-docs/src/mdx-components.modules.css @@ -0,0 +1,3 @@ +.paragraph { + font-family: var(--docs-font); +} diff --git a/canon-docs/src/mdx-components.tsx b/canon-docs/src/mdx-components.tsx index 84239d2995..308356bc67 100644 --- a/canon-docs/src/mdx-components.tsx +++ b/canon-docs/src/mdx-components.tsx @@ -1,33 +1,64 @@ +import React, { ReactNode } from 'react'; import type { MDXComponents } from 'mdx/types'; import Image, { ImageProps } from 'next/image'; -import { ReactNode } from 'react'; -import React from 'react'; import { CodeBlock } from '@/components/CodeBlock'; import { Heading } from '../../packages/canon/src/components/Heading'; -import { Text } from '../../packages/canon/src/components/Text'; import { Box } from '../../packages/canon/src/components/Box'; export function useMDXComponents(components: MDXComponents): MDXComponents { return { // Allows customizing built-in components, e.g. to add styling. h1: ({ children }) => ( - - {children as ReactNode} + +

+ {children as ReactNode} +

), h2: ({ children }) => ( - {children as ReactNode} +

+ {children as ReactNode} +

), h3: ({ children }) => ( - {children as ReactNode} +

+ {children as ReactNode} +

), p: ({ children }) => ( - {children as ReactNode} +

+ {children as ReactNode} +

), a: ({ children, href }) => ( @@ -42,6 +73,21 @@ export function useMDXComponents(components: MDXComponents): MDXComponents { return ; }, + code: ({ children }) => ( + + {children} + + ), img: props => (