Fix cmd menu tests (#1739)
* - fix tests * - fixed header * - lint - fixed catalog menuitemcommand * - fix prop destructuring in test * - combine single/multiple create and goto commands
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import { Meta, StoryObj } from '@storybook/react';
|
||||
import { Command } from 'cmdk';
|
||||
|
||||
import { IconBell } from '@/ui/icon';
|
||||
import {
|
||||
@ -24,6 +25,17 @@ export const Default: Story = {
|
||||
text: 'First option',
|
||||
command: '⌘ 1',
|
||||
},
|
||||
render: (props) => (
|
||||
<Command>
|
||||
<MenuItemCommand
|
||||
LeftIcon={props.LeftIcon}
|
||||
text={props.text}
|
||||
command={props.text}
|
||||
className={props.className}
|
||||
onClick={props.onClick}
|
||||
></MenuItemCommand>
|
||||
</Command>
|
||||
),
|
||||
decorators: [ComponentDecorator],
|
||||
};
|
||||
|
||||
@ -74,5 +86,16 @@ export const Catalog: Story = {
|
||||
} as CatalogOptions,
|
||||
},
|
||||
},
|
||||
render: (props) => (
|
||||
<Command>
|
||||
<MenuItemCommand
|
||||
LeftIcon={props.LeftIcon}
|
||||
text={props.text}
|
||||
command={props.text}
|
||||
className={props.className}
|
||||
onClick={props.onClick}
|
||||
></MenuItemCommand>
|
||||
</Command>
|
||||
),
|
||||
decorators: [CatalogDecorator],
|
||||
};
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
import styled from '@emotion/styled';
|
||||
import { Decorator, Meta, StoryObj } from '@storybook/react';
|
||||
|
||||
|
||||
import { IconSearch, IconSettings } from '@/ui/icon';
|
||||
import { CatalogDecorator } from '~/testing/decorators/CatalogDecorator';
|
||||
import { ComponentWithRouterDecorator } from '~/testing/decorators/ComponentWithRouterDecorator';
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
import { useRecoilState } from 'recoil';
|
||||
|
||||
|
||||
import { DoubleTextChipDisplay } from '@/ui/content-display/components/DoubleTextChipDisplay';
|
||||
import { ViewFieldDoubleTextChipMetadata } from '@/ui/editable-field/types/ViewField';
|
||||
import { useCurrentRowEntityId } from '@/ui/table/hooks/useCurrentEntityId';
|
||||
|
||||
Reference in New Issue
Block a user