diff --git a/packages/web-react/src/components/Navigation/stories/Navigation.stories.tsx b/packages/web-react/src/components/Navigation/stories/Navigation.stories.tsx index 13bfae830b..6d2b3ccffd 100644 --- a/packages/web-react/src/components/Navigation/stories/Navigation.stories.tsx +++ b/packages/web-react/src/components/Navigation/stories/Navigation.stories.tsx @@ -38,6 +38,6 @@ const meta: Meta = { export default meta; type Story = StoryObj; -export const NavigationPlayground: Story = { +export const Playground: Story = { name: 'Navigation', }; diff --git a/packages/web-react/src/components/Navigation/useNavigationLinkProps.ts b/packages/web-react/src/components/Navigation/useNavigationLinkProps.ts index 46de6c67ca..d3f13f1688 100644 --- a/packages/web-react/src/components/Navigation/useNavigationLinkProps.ts +++ b/packages/web-react/src/components/Navigation/useNavigationLinkProps.ts @@ -1,8 +1,6 @@ import { SpiritNavigationLinkProps } from '../../types'; -export type UseNavigationLinkProps = Partial & { - 'aria-current'?: string; -}; +export type UseNavigationLinkProps = Partial; export type UseNavigationLinkReturn = { navigationLinkProps: UseNavigationLinkProps; @@ -11,7 +9,7 @@ export type UseNavigationLinkReturn = { export const useNavigationLinkProps = (props: UseNavigationLinkProps): UseNavigationLinkReturn => { const { elementType = 'a', isDisabled, href, target, rel, ariaLabel } = props; - const additionalProps: Partial = { + const navigationLinkProps: Partial = { href: elementType === 'a' && !isDisabled ? href : undefined, target: elementType === 'a' && !isDisabled ? target : undefined, rel: elementType === 'a' ? rel : undefined, @@ -19,8 +17,6 @@ export const useNavigationLinkProps = (props: UseNavigationLinkProps): UseNaviga }; return { - navigationLinkProps: { - ...additionalProps, - }, + navigationLinkProps, }; }; diff --git a/packages/web-react/src/types/navigation.ts b/packages/web-react/src/types/navigation.ts index 2859b4db4a..a14890cdf1 100644 --- a/packages/web-react/src/types/navigation.ts +++ b/packages/web-react/src/types/navigation.ts @@ -9,7 +9,7 @@ import { TransferProps, } from './shared'; -export interface SpiritNavigationProps extends StyleProps { +export interface SpiritNavigationProps extends StyleProps, AriaLabelingProps { children: | ReactElement | ReactElement