Skip to content

Commit 882611b

Browse files
committed
🔥 Update downstream props/types
1 parent 19f3b44 commit 882611b

3 files changed

Lines changed: 13 additions & 25 deletions

File tree

‎src/components/collapsible_nav_beta/collapsible_nav_beta.stories.tsx‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,6 @@ export const SecurityExample: Story = {
331331
{ title: 'Intelligence', href: '#' },
332332
{
333333
title: 'Explore',
334-
href: '#',
335334
items: [
336335
{ title: 'Host', href: '#' },
337336
{ title: 'Users', href: '#', isSelected: true },
@@ -342,7 +341,6 @@ export const SecurityExample: Story = {
342341
{ title: 'Assets', href: '#' },
343342
{
344343
title: 'Rules',
345-
href: '#',
346344
items: [
347345
{ title: 'SIEM rules', href: '#' },
348346
{ title: 'Shared exception list', href: '#' },
@@ -352,7 +350,6 @@ export const SecurityExample: Story = {
352350
},
353351
{
354352
title: 'Machine learning',
355-
href: '#',
356353
items: [
357354
{ title: 'Overview', href: '#' },
358355
{ title: 'Notifications', href: '#' },
@@ -364,7 +361,6 @@ export const SecurityExample: Story = {
364361
},
365362
{
366363
title: 'Settings',
367-
href: '#',
368364
items: [
369365
{ title: 'Endpoints', href: '#' },
370366
{ title: 'OS query', href: '#' },

‎src/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.stories.tsx‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,4 @@ export const EdgeCaseTesting: Story = {
8787
<EuiCollapsibleNavBeta.Group {...args} />
8888
</CollapsibleNavTemplate>
8989
),
90-
args: {
91-
href: '#',
92-
},
9390
};

‎src/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.tsx‎

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,24 @@ import { EuiCollapsibleNavContext } from '../context';
1616
import {
1717
EuiCollapsibleNavItem,
1818
EuiCollapsibleNavSubItems,
19-
EuiCollapsibleNavSubItemProps,
20-
EuiCollapsibleNavItemProps,
19+
type EuiCollapsibleNavItemProps,
20+
type _SharedEuiCollapsibleNavItemProps,
2121
} from '../collapsible_nav_item/collapsible_nav_item';
2222
import { EuiCollapsedNavPopover } from '../collapsible_nav_item/collapsed/collapsed_nav_popover';
2323

2424
import { euiCollapsibleNavGroupStyles } from './collapsible_nav_group.styles';
2525

26-
export type EuiCollapsibleNavGroupProps = Omit<
27-
EuiCollapsibleNavItemProps,
28-
'items' | 'accordionProps'
29-
> & {
30-
/**
31-
* Will render an array of `EuiCollapsibleNavItems`.
32-
*
33-
* Accepts any #EuiCollapsibleNavItemProps. Or, to render completely custom
34-
* subitem content, pass an object with a `renderItem` callback.
35-
*/
36-
items: EuiCollapsibleNavSubItemProps[];
37-
/**
38-
* Optional props to pass to the wrapping div
39-
*/
40-
wrapperProps?: HTMLAttributes<HTMLDivElement> & CommonProps;
41-
};
26+
export type EuiCollapsibleNavGroupProps = _SharedEuiCollapsibleNavItemProps &
27+
Pick<
28+
EuiCollapsibleNavItemProps,
29+
'title' | 'titleElement' | 'icon' | 'iconProps'
30+
> &
31+
Required<Pick<EuiCollapsibleNavItemProps, 'items'>> & {
32+
/**
33+
* Optional props to pass to the wrapping div
34+
*/
35+
wrapperProps?: HTMLAttributes<HTMLDivElement> & CommonProps;
36+
};
4237

4338
/**
4439
* This component should only ever be used as a **top-level component**, and not as a sub-item.

0 commit comments

Comments
 (0)