diff --git a/site/docs/kitchen-sink/index.mdx b/site/docs/kitchen-sink/index.mdx index af9466b6..b2dfd4b5 100644 --- a/site/docs/kitchen-sink/index.mdx +++ b/site/docs/kitchen-sink/index.mdx @@ -136,22 +136,22 @@ Inline `code` has `back-ticks around` it. Inline [`code`]() with link. -### `heading3` heading +Inline `console.log("hello world"){:js}` highlighted code -#### `heading4` heading - -##### `heading5` heading - -###### `heading6` heading +```plaintext +wowee plain text! +``` -Inline `console.log("hello world"){:js}` code +```bash [Terminal] +npm i vocs +``` -```ts +```ts [example.ts] type Example = string // [!code hl] const example: Example = 'example' ``` -```ts showLineNumbers {2,3,6-9} +```ts [Line Highlight & Numbers] showLineNumbers {2,3,6-9} // 1. Import modules. import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' @@ -166,7 +166,7 @@ const client = createPublicClient({ const blockNumber = await client.getBlockNumber() ``` -```ts /mainnet/1-2 /client/2-3 +```ts [Word Focus] /mainnet/1-2 /client/2-3 // 1. Import modules. import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' @@ -181,7 +181,7 @@ const client = createPublicClient({ const blockNumber = await client.getBlockNumber() ``` -```ts +```ts [Line Focus] // 1. Import modules. import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' @@ -196,7 +196,7 @@ const client = createPublicClient({ const blockNumber = await client.getBlockNumber() // [!code focus] ``` -```ts +```ts [Diff] // 1. Import modules. import { createPublicClient } from 'viem' // [!code --] import { createPublicClient, http } from 'viem' // [!code ++] @@ -212,20 +212,6 @@ const client = createPublicClient({ const blockNumber = await client.getBlockNumber() ``` -```ts twoslash -interface IdLabel {id: number, /* some fields */ } -interface NameLabel {name: string, /* other fields */ } -type NameOrId = T extends number ? IdLabel : NameLabel; -// This comment should not be included - -// ---cut--- -function createLabel(idOrName: T): NameOrId { - throw "unimplemented" -} - -let a = createLabel("typescript"); -``` - :::tip[Tip:] Make sure to do the thing that does stuff. ::: diff --git a/src/app/components/CodeTitle.tsx b/src/app/components/CodeTitle.tsx index 434013e0..053bc3ce 100644 --- a/src/app/components/CodeTitle.tsx +++ b/src/app/components/CodeTitle.tsx @@ -8,9 +8,9 @@ export function CodeTitle({ children, ...props }: { children: string }) {
{language === 'bash' ? ( - ) : ( + ) : children.match(/\.(.*)$/) ? ( - )} + ) : null} {children}