({
icon,
title,
summary,
isOpen,
onToggle,
className,
children,
}: {
icon: ReactElement;
title: string;
summary: string;
isOpen: boolean;
onToggle: () => void;
className?: string;
children: ReactNode;
})
| 423 | } |
| 424 | |
| 425 | const AudienceRow = ({ |
| 426 | icon, |
| 427 | title, |
| 428 | summary, |
| 429 | isOpen, |
| 430 | onToggle, |
| 431 | className, |
| 432 | children, |
| 433 | }: { |
| 434 | icon: ReactElement; |
| 435 | title: string; |
| 436 | summary: string; |
| 437 | isOpen: boolean; |
| 438 | onToggle: () => void; |
| 439 | className?: string; |
| 440 | children: ReactNode; |
| 441 | }): ReactElement => ( |
| 442 | <div className={classNames('flex flex-col gap-3 p-3', className)}> |
| 443 | <div className="flex items-center gap-3"> |
| 444 | <span className="flex size-8 shrink-0 items-center justify-center rounded-10 bg-surface-float text-text-secondary"> |
| 445 | {icon} |
| 446 | </span> |
| 447 | <div className="flex min-w-0 flex-1 flex-col"> |
| 448 | <Typography |
| 449 | type={TypographyType.Footnote} |
| 450 | color={TypographyColor.Tertiary} |
| 451 | > |
| 452 | {title} |
| 453 | </Typography> |
| 454 | <Typography type={TypographyType.Callout} bold truncate> |
| 455 | {summary} |
| 456 | </Typography> |
| 457 | </div> |
| 458 | <Button |
| 459 | type="button" |
| 460 | size={ButtonSize.Small} |
| 461 | variant={ButtonVariant.Tertiary} |
| 462 | onClick={onToggle} |
| 463 | > |
| 464 | {isOpen ? 'Done' : 'Edit'} |
| 465 | </Button> |
| 466 | </div> |
| 467 | {isOpen && <div className="flex flex-col gap-3">{children}</div>} |
| 468 | </div> |
| 469 | ); |
| 470 | |
| 471 | interface BoostAudienceProps { |
| 472 | postTags: string[]; |
nothing calls this directly
no outgoing calls
no test coverage detected