Skip to content
Open
Show file tree
Hide file tree
Changes from 6 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 @@ -3,6 +3,7 @@
'use client';

import type {ComponentProps} from 'react';
import {Cog6ToothIcon, LifebuoyIcon} from '@heroicons/react/24/outline';
Comment thread
astracat-bot[bot] marked this conversation as resolved.
Resolved
import {
SideNav,
SideNavHeading,
Expand Down Expand Up @@ -80,7 +81,14 @@ function DocumentTextIcon(props: ComponentProps<'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