Skip to content

Commit

Permalink
docs(storybook): update types & add control category name
Browse files Browse the repository at this point in the history
  • Loading branch information
mgadewoll committed May 10, 2024
1 parent ab95873 commit 8f362e7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
import { EuiSelectableOption } from '../selectable_option';
import { EuiSelectableList, EuiSelectableListProps } from './selectable_list';

const options = [
const options: EuiSelectableOption[] = [
{
label: 'Titan',
'data-test-subj': 'titanOption',
Expand Down Expand Up @@ -52,7 +52,7 @@ const options = [
{
label: 'Hyperion',
},
] as EuiSelectableOption[];
];

const meta: Meta<EuiSelectableListProps<{}>> = {
title: 'Forms/EuiSelectable/EuiSelectableList/EuiSelectableList',
Expand All @@ -78,14 +78,18 @@ const meta: Meta<EuiSelectableListProps<{}>> = {
},
};
enableFunctionToggleControls(meta, ['onOptionClick', 'setActiveOptionIndex']);
moveStorybookControlsToCategory(meta, [
'allowExclusions',
'onFocusBadge',
'paddingSize',
'searchable',
'showIcons',
'textWrap',
]);
moveStorybookControlsToCategory(
meta,
[
'allowExclusions',
'onFocusBadge',
'paddingSize',
'searchable',
'showIcons',
'textWrap',
],
'EuiSelectableListItem props'
);

export default meta;
type Story = StoryObj<EuiSelectableListProps<{}>>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
_EuiSelectableSearchProps as EuiSelectableSearchProps,
} from './selectable_search';

const options = [
const options: EuiSelectableOption[] = [
{
label: 'Titan',
'data-test-subj': 'titanOption',
Expand Down Expand Up @@ -55,7 +55,7 @@ const options = [
{
label: 'Hyperion',
},
] as EuiSelectableOption[];
];

const meta: Meta<EuiSelectableSearchProps<{}>> = {
title: 'Forms/EuiSelectable/EuiSelectableSearch',
Expand Down

0 comments on commit 8f362e7

Please sign in to comment.