"use client"; import type { MantineColor } from "@mantine/core"; import { Badge, Group, Text } from "@mantine/core"; import type { SelectWithCustomItemsProps } from "./select-with-custom-items"; import { SelectWithCustomItems } from "./select-with-custom-items"; export interface SelectItemWithDescriptionBadge { value: string; label: string; badge?: { label: string; color: MantineColor }; description: string; } type Props = SelectWithCustomItemsProps; export const SelectWithDescriptionBadge = (props: Props) => { return {...props} SelectOption={SelectOption} />; }; const SelectOption = ({ label, description, badge }: SelectItemWithDescriptionBadge) => { return (
{label} {description}
{badge && ( {badge.label} )}
); };