Custom content-type for multipart items

This commit is contained in:
Gregory Schier
2024-03-16 12:49:17 -07:00
parent 4b33a696ac
commit 901cf53cd2
8 changed files with 120 additions and 48 deletions

View File

@@ -1,5 +1,5 @@
import { useMemo } from 'react';
import type { DropdownItemSeparator, DropdownProps } from './Dropdown';
import type { DropdownItem, DropdownItemSeparator, DropdownProps } from './Dropdown';
import { Dropdown } from './Dropdown';
import { Icon } from './Icon';
@@ -42,7 +42,7 @@ export function RadioDropdown<T = string | null>({
};
}
}),
...(extraItems ?? []),
...((extraItems ? [{ type: 'separator' }, ...extraItems] : []) as DropdownItem[]),
],
[items, extraItems, value, onChange],
);