import type { BadgeProps, MantineSpacing } from "@mantine/core"; import { Badge, Group, Popover, Stack, UnstyledButton } from "@mantine/core"; export function OverflowBadge({ data, overflowCount = 3, disablePopover = false, groupGap = "xs", ...props }: { data: string[]; overflowCount?: number; disablePopover?: boolean; groupGap?: MantineSpacing; } & BadgeProps) { const badgeProps = { variant: "default", size: "lg", radius: "sm", ...props, }; return ( {data.slice(0, overflowCount).map((item) => ( {item} ))} {data.length > overflowCount && ( +{data.length - overflowCount} )} {data.slice(overflowCount).map((item) => ( {item} ))} ); }