diff --git a/site/src/components/SettingsLayout/Sidebar.tsx b/site/src/components/SettingsLayout/Sidebar.tsx index 115f481dcc4f0..6657aab80ab58 100644 --- a/site/src/components/SettingsLayout/Sidebar.tsx +++ b/site/src/components/SettingsLayout/Sidebar.tsx @@ -26,7 +26,6 @@ export const Sidebar: React.FC<{ user: User }> = ({ user }) => { title={user.username} subtitle={user.email} /> - ; Account diff --git a/site/src/components/Sidebar/Sidebar.stories.tsx b/site/src/components/Sidebar/Sidebar.stories.tsx new file mode 100644 index 0000000000000..f642eeb287c02 --- /dev/null +++ b/site/src/components/Sidebar/Sidebar.stories.tsx @@ -0,0 +1,45 @@ +import { Sidebar, SidebarHeader, SidebarNavItem } from "./Sidebar"; +import type { Meta, StoryObj } from "@storybook/react"; +import { UserAvatar } from "components/UserAvatar/UserAvatar"; +import VpnKeyOutlined from "@mui/icons-material/VpnKeyOutlined"; +import FingerprintOutlinedIcon from "@mui/icons-material/FingerprintOutlined"; +import AccountIcon from "@mui/icons-material/Person"; +import ScheduleIcon from "@mui/icons-material/EditCalendarOutlined"; +import SecurityIcon from "@mui/icons-material/LockOutlined"; + +const meta: Meta = { + title: "components/Sidebar", + component: Sidebar, +}; + +export default meta; +type Story = StoryObj; + +export const Default: Story = { + args: { + children: ( + + } + title="Jon" + subtitle="jon@coder.com" + /> + + Account + + + Schedule + + + Security + + + SSH Keys + + + Tokens + + + ), + }, +}; diff --git a/site/src/components/Sidebar/Sidebar.tsx b/site/src/components/Sidebar/Sidebar.tsx index f3e268267a508..396bec9a48b97 100644 --- a/site/src/components/Sidebar/Sidebar.tsx +++ b/site/src/components/Sidebar/Sidebar.tsx @@ -29,7 +29,13 @@ export const SidebarHeader: FC = ({ return ( {avatar} -
+
{linkTo ? ( {title} @@ -80,9 +86,7 @@ const styles = { ...(theme.typography.body2 as CSSObject), marginBottom: 16, }), - data: { - overflow: "hidden", - }, + title: (theme) => ({ fontWeight: 600, overflow: "hidden",