Skip to content

Commit

Permalink
Fix type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ghengeveld committed Nov 4, 2024
1 parent d5c3095 commit 9aa2f86
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
8 changes: 5 additions & 3 deletions code/core/src/manager/components/sidebar/Heading.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ export default {
} as Meta<typeof Heading>;

const menuItems = [
{ title: 'Menu Item 1', onClick: action('onActivateMenuItem'), id: '1' },
{ title: 'Menu Item 2', onClick: action('onActivateMenuItem'), id: '2' },
{ title: 'Menu Item 3', onClick: action('onActivateMenuItem'), id: '3' },
[
{ title: 'Menu Item 1', onClick: action('onActivateMenuItem'), id: '1' },
{ title: 'Menu Item 2', onClick: action('onActivateMenuItem'), id: '2' },
{ title: 'Menu Item 3', onClick: action('onActivateMenuItem'), id: '3' },
],
];

export const MenuHighlighted: Story = () => (
Expand Down
11 changes: 6 additions & 5 deletions code/core/src/manager/components/sidebar/Menu.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type { ComponentProps } from 'react';
import React from 'react';

import { TooltipLinkList } from '@storybook/core/components';
Expand All @@ -11,11 +10,13 @@ import type { State } from '@storybook/core/manager-api';

import { useMenu } from '../../container/Menu';
import { LayoutProvider } from '../layout/LayoutProvider';
import { SidebarMenu } from './Menu';
import { type MenuList, SidebarMenu } from './Menu';

const fakemenu: ComponentProps<typeof TooltipLinkList>['links'] = [
{ title: 'has icon', icon: <LinkIcon />, id: 'icon' },
{ title: 'has no icon', id: 'non' },
const fakemenu: MenuList = [
[
{ title: 'has icon', icon: <LinkIcon />, id: 'icon' },
{ title: 'has no icon', id: 'non' },
],
];

const meta = {
Expand Down

0 comments on commit 9aa2f86

Please sign in to comment.