Browse Source

fix: BreadcrumbItem menu type (#41373)

* fix: BreadcrumbItem menu type

* Update components/breadcrumb/BreadcrumbItem.tsx

Co-authored-by: acyza <101238421+acyza@users.noreply.github.com>

---------

Co-authored-by: acyza <101238421+acyza@users.noreply.github.com>
pull/41385/head
二货爱吃白萝卜 2 years ago
committed by GitHub
parent
commit
c6de488432
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      components/breadcrumb/BreadcrumbItem.tsx
  2. 4
      components/breadcrumb/__tests__/Breadcrumb.test.tsx

2
components/breadcrumb/BreadcrumbItem.tsx

@ -11,7 +11,7 @@ export interface SeparatorType {
key?: React.Key;
}
type MenuType = DropdownProps['menu'];
type MenuType = NonNullable<DropdownProps['menu']>;
interface MenuItem {
title?: React.ReactNode;
label?: React.ReactNode;

4
components/breadcrumb/__tests__/Breadcrumb.test.tsx

@ -343,4 +343,8 @@ describe('Breadcrumb', () => {
const item = await wrapper.findByText('test');
expect(item).toHaveClass(testClassName);
});
it('Breadcrumb.Item menu type', () => {
expect(<Breadcrumb.Item menu={{ selectable: true }} />).toBeTruthy();
});
});

Loading…
Cancel
Save