feat: add missing MDX component overrides (ul, ol, figure, kbd, details, etc.)
This commit is contained in:
@@ -58,5 +58,27 @@ export function useMDXComponents(components: MDXComponents): MDXComponents {
|
||||
</table>
|
||||
</div>
|
||||
),
|
||||
|
||||
// Lists
|
||||
ul: (props) => <ul className="my-6 ml-6 list-disc [&>li]:mt-2" {...props} />,
|
||||
ol: (props) => <ol className="my-6 ml-6 list-decimal [&>li]:mt-2" {...props} />,
|
||||
li: (props) => <li className="leading-7" {...props} />,
|
||||
|
||||
// Figures and captions
|
||||
figure: (props) => <figure className="my-8" {...props} />,
|
||||
figcaption: (props) => <figcaption className="text-center text-sm text-ink-soft mt-2" {...props} />,
|
||||
|
||||
// Subscripts and superscripts
|
||||
sup: (props) => <sup className="text-xs" {...props} />,
|
||||
sub: (props) => <sub className="text-xs" {...props} />,
|
||||
|
||||
// Keyboard keys
|
||||
kbd: (props) => (
|
||||
<kbd className="rounded bg-surface px-2 py-1 font-mono text-xs text-ink border border-border" {...props} />
|
||||
),
|
||||
|
||||
// Collapsible sections
|
||||
details: (props) => <details className="my-4 rounded-lg border border-border p-4" {...props} />,
|
||||
summary: (props) => <summary className="cursor-pointer font-semibold" {...props} />,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user