diff --git a/.storybook/components/DomRefTable.tsx b/.storybook/components/DomRefTable.tsx index 0e0d48f1e37..e24a6ea688f 100644 --- a/.storybook/components/DomRefTable.tsx +++ b/.storybook/components/DomRefTable.tsx @@ -46,6 +46,43 @@ function Name(props: CEM.ClassMember) { ); } +export function ShadowPartsTable({ componentName, cssParts }: { componentName: string; cssParts: CEM.CssPart[] }) { + return ( + <> + CSS Shadow Parts +

+ + CSS Shadow Parts + {' '} + allow developers to style elements inside the Shadow DOM. +

+

+ The {componentName} exposes the following CSS Shadow Parts: +

+ + + + + + + + + {cssParts.map((part) => ( + + + + + ))} + +
NameDescription
+ {part.name} + {part.description}
+ + ); +} + +ShadowPartsTable.displayName = 'ShadowPartsTable'; + export function DomRefTable() { const docsContext = useContext(DocsContext); const storyTags: string[] = docsContext.attachedCSFFile?.meta?.tags; @@ -146,38 +183,7 @@ export function DomRefTable() { ) : null} - {cssParts.length > 0 ? ( - <> - CSS Shadow Parts -

- - CSS Shadow Parts - {' '} - allow developers to style elements inside the Shadow DOM. -

-

- The {componentName} exposes the following CSS Shadow Parts: -

- - - - - - - - - {cssParts.map((part) => ( - - - - - ))} - -
NameDescription
- {part.name} - {part.description}
- - ) : null} + {cssParts.length > 0 ? : null} ); } diff --git a/packages/main/src/components/Toolbar/Toolbar.mdx b/packages/main/src/components/Toolbar/Toolbar.mdx index 9d80ea70cab..148480af8bc 100644 --- a/packages/main/src/components/Toolbar/Toolbar.mdx +++ b/packages/main/src/components/Toolbar/Toolbar.mdx @@ -10,6 +10,7 @@ import { ToolbarSpacer, ToolbarSeparator } from '../..'; +import { ShadowPartsTable } from '@sb/components/DomRefTable'; @@ -254,12 +255,28 @@ const ToolbarComponent = () => { + + ## OverflowToolbarToggleButton + + ## ToolbarSpacer