Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/fix-sidenav-showcase-bounds.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@astryxdesign/cli': patch
---

[fix] The SideNav showcase now includes support and settings destinations in its footer so the Overview preview demonstrates the complete navigation surface.

@bezabyte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const doc = {
name: 'SideNav',
displayName: 'Side Nav',
isReady: true,
aspectRatio: 1,
aspectRatio: 16 / 9,
Comment thread
astracat-bot[bot] marked this conversation as resolved.
Resolved
isShowcase: true,
componentsUsed: ['SideNav'],
};
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,55 @@ function DocumentTextIcon(props: ComponentProps<'svg'>) {
);
}

function Cog6ToothIcon(props: ComponentProps<'svg'>) {
return (
<svg
fill="none"
viewBox="0 0 24 24"
strokeWidth={1.5}
stroke="currentColor"
{...props}>
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z"
/>
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"
/>
</svg>
);
}

function LifebuoyIcon(props: ComponentProps<'svg'>) {
return (
<svg
fill="none"
viewBox="0 0 24 24"
strokeWidth={1.5}
stroke="currentColor"
{...props}>
<path
strokeLinecap="round"
strokeLinejoin="round"
d="m7.864 4.243 3.32 3.319m1.632 0 3.32-3.32M7.864 19.757l3.32-3.319m1.632 0 3.32 3.32M4.243 7.864l3.319 3.32m0 1.632-3.32 3.32M19.757 7.864l-3.319 3.32m0 1.632 3.32 3.32M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-6 0a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"
/>
</svg>
);
}

export default function SideNavShowcase() {
return (
<SideNav header={<SideNavHeading heading="My App" headingHref="/" />}>
<SideNav
header={<SideNavHeading heading="My App" headingHref="/" />}
footer={
<SideNavSection title="Support" isHeaderHidden>
<SideNavItem label="Help & docs" icon={LifebuoyIcon} href="/help" />
<SideNavItem label="Settings" icon={Cog6ToothIcon} href="/settings" />
</SideNavSection>
}>
<SideNavSection title="Main">
<SideNavItem
label="Dashboard"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,16 @@ export const doc = {
exampleFor: 'SideNavCollapseButton',
name: 'SideNavCollapseButton',
displayName: 'Side Nav Collapse Button',
description: 'Demonstrates SideNavCollapseButton inside a collapsible SideNav.',
description:
'Demonstrates SideNavCollapseButton inside a collapsible SideNav.',
isReady: true,
isShowcase: true,
aspectRatio: 4 / 3,
componentsUsed: ['SideNav', 'SideNavCollapseButton', 'SideNavItem', 'SideNavSection'],
componentsUsed: [
'SideNav',
'SideNavCollapseButton',
'SideNavItem',
'SideNavSection',
'SideNavHeading',
],
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ export const doc = {
exampleFor: 'SideNavHeading',
name: 'SideNavHeading',
displayName: 'Side Nav Heading',
description: 'Demonstrates SideNavHeading with an app name, logo icon, superheading, and subheading.',
description:
'Demonstrates SideNavHeading with an app name, logo icon, superheading, and subheading.',
isReady: true,
isShowcase: true,
aspectRatio: 4 / 3,
componentsUsed: ['SideNav', 'SideNavHeading'],
componentsUsed: ['SideNav', 'SideNavHeading', 'HStack'],
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

'use client';

import {SideNav, SideNavHeading} from '@astryxdesign/core/SideNav';
import {HStack} from '@astryxdesign/core/Layout';
import {SideNav, SideNavHeading} from '@astryxdesign/core/SideNav';

function AppIcon() {
return (
Expand All @@ -23,6 +23,7 @@ function AppIcon() {
);
}

// Compare a simple heading against one with a superheading and subheading.
export default function SideNavHeadingShowcase() {
return (
<HStack gap={6}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ export const doc = {
exampleFor: 'SideNavItem',
name: 'SideNavItem',
displayName: 'Side Nav Item',
description: 'Demonstrates SideNavItem with selected, icon, disabled, and nested states.',
description:
'Demonstrates SideNavItem with selected, icon, disabled, and nested states.',
isReady: true,
isShowcase: true,
aspectRatio: 4 / 3,
componentsUsed: ['SideNav', 'SideNavItem', 'SideNavSection'],
componentsUsed: ['SideNav', 'SideNavItem', 'Badge'],
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ export const doc = {
exampleFor: 'SideNavSection',
name: 'SideNavSection',
displayName: 'Side Nav Section',
description: 'Demonstrates SideNavSection with titled groups of navigation items.',
description:
'Demonstrates SideNavSection with titled groups of navigation items.',
isReady: true,
isShowcase: true,
aspectRatio: 4 / 3,
Expand Down