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

Function CompactItem

packages/shared/src/components/fields/DragDrop.tsx:113–137  ·  view source on GitHub ↗
({
  name,
  state,
  className,
  showRemove,
  onRemove,
}: ItemProps)

Source from the content-addressed store, hash-verified

111);
112
113const CompactItem = ({
114 name,
115 state,
116 className,
117 showRemove,
118 onRemove,
119}: ItemProps) => (
120 <div className={classNames('flex w-full items-center gap-1', className)}>
121 <DocsIcon secondary />
122 <div className="min-w-0 flex-1 text-left">
123 <Typography className="truncate" type={TypographyType.Footnote} bold>
124 {name}
125 </Typography>
126 </div>
127 {getIcon(state)}
128 {showRemove && (
129 <Button
130 variant={ButtonVariant.Tertiary}
131 size={ButtonSize.XSmall}
132 onClick={onRemove}
133 icon={<ClearIcon />}
134 />
135 )}
136 </div>
137);
138
139export const dragDropClasses =
140 'relative flex flex-1 rounded-10 border border-dashed border-border-subtlest-secondary';

Callers

nothing calls this directly

Calls 1

getIconFunction · 0.70

Tested by

no test coverage detected