MCPcopy Create free account
hub / github.com/dailydotdev/apps / AudienceRow

Function AudienceRow

packages/shared/src/features/boost/BoostAudience.tsx:425–469  ·  view source on GitHub ↗
({
  icon,
  title,
  summary,
  isOpen,
  onToggle,
  className,
  children,
}: {
  icon: ReactElement;
  title: string;
  summary: string;
  isOpen: boolean;
  onToggle: () => void;
  className?: string;
  children: ReactNode;
})

Source from the content-addressed store, hash-verified

423}
424
425const 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
471interface BoostAudienceProps {
472 postTags: string[];

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected