diff --git a/site/src/components/BorderedMenu/BorderedMenu.stories.tsx b/site/src/components/BorderedMenu/BorderedMenu.stories.tsx index 73186fd77f..e53deab3fa 100644 --- a/site/src/components/BorderedMenu/BorderedMenu.stories.tsx +++ b/site/src/components/BorderedMenu/BorderedMenu.stories.tsx @@ -12,8 +12,14 @@ export default { const Template: Story = (args: BorderedMenuProps) => ( - - + + ) diff --git a/site/src/components/BorderedMenuRow/BorderedMenuRow.tsx b/site/src/components/BorderedMenuRow/BorderedMenuRow.tsx index d83bebdf52..32b218b282 100644 --- a/site/src/components/BorderedMenuRow/BorderedMenuRow.tsx +++ b/site/src/components/BorderedMenuRow/BorderedMenuRow.tsx @@ -17,7 +17,7 @@ interface BorderedMenuRowProps { /** An SvgIcon that will be rendered to the left of the title */ Icon: typeof SvgIcon /** URL path */ - path?: string + path: string /** Required title of this row */ title: string /** Defaults to `"wide"` */ @@ -37,38 +37,30 @@ export const BorderedMenuRow: React.FC = ({ }) => { const styles = useStyles() - const Component = () => ( - -
-
- - {title} - {active && } + return ( + + +
+
+ + {title} + {active && } +
+ + {description && ( + + {ellipsizeText(description)} + + )}
- - {description && ( - - {ellipsizeText(description)} - - )} -
- + + ) - - if (path) { - return ( - - - - ) - } - - return } const iconSize = 20