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

Function Chip

packages/shared/src/features/boost/BoostAudience.tsx:363–391  ·  view source on GitHub ↗
({
  label,
  isSelected,
  onClick,
}: {
  label: string;
  isSelected: boolean;
  onClick: () => void;
})

Source from the content-addressed store, hash-verified

361const maxSuggestions = 5;
362
363const 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
393const SectionLabel = ({ title }: { title: string }): ReactElement => (
394 <Typography type={TypographyType.Callout} color={TypographyColor.Tertiary}>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected