430924f8b6
Uses sandpack in all places so we can do richer code snippets. Also, drive-by fix to fix sidebar logic. Also, drive-by fix to hide keyboard hint (Cmd+K) for search on mobile. ### Change Type - [x] `documentation` — Changes to the documentation only[^2] ### Release Notes - Docs: reworks code snippets
61 lines
835 B
TypeScript
61 lines
835 B
TypeScript
import * as customComponents from '../article-components'
|
|
import * as apiComponents from './api-docs'
|
|
import {
|
|
A,
|
|
ApiHeading,
|
|
Blockquote,
|
|
Divider,
|
|
Embed,
|
|
Heading1,
|
|
Heading2,
|
|
Heading3,
|
|
Heading4,
|
|
Heading5,
|
|
Heading6,
|
|
Image,
|
|
ListItem,
|
|
OrderedList,
|
|
Paragraph,
|
|
Pre,
|
|
Small,
|
|
TD,
|
|
THead,
|
|
TR,
|
|
Table,
|
|
UnorderedList,
|
|
Video,
|
|
} from './generic'
|
|
|
|
import { Code, CodeBlock } from './code'
|
|
|
|
export const components = {
|
|
a: A,
|
|
blockquote: Blockquote,
|
|
code: Code,
|
|
h1: Heading1,
|
|
h2: Heading2,
|
|
h3: Heading3,
|
|
h4: Heading4,
|
|
h5: Heading5,
|
|
h6: Heading6,
|
|
hr: Divider,
|
|
img: Image,
|
|
li: ListItem,
|
|
ol: OrderedList,
|
|
p: Paragraph,
|
|
pre: Pre,
|
|
table: Table,
|
|
td: TD,
|
|
thead: THead,
|
|
tr: TR,
|
|
ul: UnorderedList,
|
|
video: Video,
|
|
ApiHeading,
|
|
CodeBlock,
|
|
Embed,
|
|
Image,
|
|
Small: Small,
|
|
Video,
|
|
...customComponents,
|
|
...apiComponents,
|
|
}
|