fix: gui-docs sidebar layout, table rendering, broken link

This commit is contained in:
2026-03-29 18:34:02 -07:00
parent 226b238f36
commit 4fee727422
3 changed files with 11 additions and 4 deletions
+1
View File
@@ -1,2 +1,3 @@
@import 'tailwindcss';
@import '@hanzo/docs-base-ui/css/neutral.css';
@import '@hanzo/docs-base-ui/css/preset.css';
@@ -620,7 +620,7 @@ Sub-themes can be subsets of parent themes likewise as their values will fall
back to the parent theme. They can also be nested as deeply as you like - so
even `light_alert_subtle` is possible.
For more on themes, see the [themes docs](/docs/core/themes), and more
For more on themes, see the [themes docs](/docs/intro/themes), and more
[advanced theme building library](/docs/guides/theme-builder).
### Media
+9 -3
View File
@@ -171,8 +171,9 @@ export function getMDXComponents(components?: MDXComponents): MDXComponents {
Blog: Object.assign(Passthrough, {
ThemeBuilder: Object.assign(Passthrough, { ExamplePalette: Passthrough }),
}),
TableCell: Passthrough,
TableCol: Passthrough,
TableCell: ({ children, head }: { children?: ReactNode; head?: boolean }) =>
head ? <th className="pb-2 pr-4 font-medium text-left">{children}</th> : <td className="py-2 pr-4 text-sm">{children}</td>,
TableCol: ({ children }: { children?: ReactNode }) => <tr className="border-b border-fd-border">{children}</tr>,
// Demo/chart components used in docs prose (render as passthrough)
IntroParagraph: Passthrough,
LogoCard: Passthrough,
@@ -183,7 +184,12 @@ export function getMDXComponents(components?: MDXComponents): MDXComponents {
TokensDemo: Passthrough,
ColorsDemo: Passthrough,
SimpleTable: Passthrough,
Table: Passthrough,
Table: ({ children, heading }: { children?: ReactNode; heading?: string }) => (
<div className="my-6 overflow-x-auto">
{heading && <h4 className="mb-2 text-sm font-medium text-fd-muted-foreground">{heading}</h4>}
<table className="w-full text-sm"><tbody>{children}</tbody></table>
</div>
),
Code: (props: any) => <code {...props} />,
...components,
};