({
label,
isSelected,
onClick,
}: {
label: string;
isSelected: boolean;
onClick: () => void;
})
| 361 | const maxSuggestions = 5; |
| 362 | |
| 363 | const Chip = ({ |
| 364 | label, |
| 365 | isSelected, |
| 366 | onClick, |
| 367 | }: { |
| 368 | label: string; |
| 369 | isSelected: boolean; |
| 370 | onClick: () => void; |
| 371 | }): ReactElement => ( |
| 372 | <Button |
| 373 | type="button" |
| 374 | size={ButtonSize.Small} |
| 375 | variant={isSelected ? ButtonVariant.Subtle : ButtonVariant.Float} |
| 376 | icon={ |
| 377 | isSelected ? ( |
| 378 | <MiniCloseIcon size={IconSize.Size16} /> |
| 379 | ) : ( |
| 380 | <PlusIcon size={IconSize.Size16} /> |
| 381 | ) |
| 382 | } |
| 383 | iconPosition={ |
| 384 | isSelected ? ButtonIconPosition.Right : ButtonIconPosition.Left |
| 385 | } |
| 386 | onClick={onClick} |
| 387 | aria-label={isSelected ? `Remove ${label}` : `Add ${label}`} |
| 388 | > |
| 389 | {label} |
| 390 | </Button> |
| 391 | ); |
| 392 | |
| 393 | const SectionLabel = ({ title }: { title: string }): ReactElement => ( |
| 394 | <Typography type={TypographyType.Callout} color={TypographyColor.Tertiary}> |
nothing calls this directly
no outgoing calls
no test coverage detected