Function
LargeItem
({
name,
state,
uploadAt,
showRemove,
onRemove,
}: ItemProps)
Source from the content-addressed store, hash-verified
| 75 | } |
| 76 | |
| 77 | const LargeItem = ({ |
| 78 | name, |
| 79 | state, |
| 80 | uploadAt, |
| 81 | showRemove, |
| 82 | onRemove, |
| 83 | }: ItemProps) => ( |
| 84 | <div className="flex w-full items-center gap-1"> |
| 85 | <DocsIcon secondary size={IconSize.Size48} /> |
| 86 | <div className="flex min-w-0 flex-1 flex-col"> |
| 87 | <Typography className="truncate" type={TypographyType.Subhead} bold> |
| 88 | {name} |
| 89 | </Typography> |
| 90 | {uploadAt && ( |
| 91 | <Typography |
| 92 | className="truncate" |
| 93 | type={TypographyType.Caption2} |
| 94 | color={TypographyColor.Tertiary} |
| 95 | bold |
| 96 | > |
| 97 | {uploadAt.toDateString()} |
| 98 | </Typography> |
| 99 | )} |
| 100 | </div> |
| 101 | {getIcon(state)} |
| 102 | {showRemove && ( |
| 103 | <Button |
| 104 | variant={ButtonVariant.Tertiary} |
| 105 | size={ButtonSize.XSmall} |
| 106 | onClick={onRemove} |
| 107 | icon={<ClearIcon />} |
| 108 | /> |
| 109 | )} |
| 110 | </div> |
| 111 | ); |
| 112 | |
| 113 | const CompactItem = ({ |
| 114 | name, |
Callers
nothing calls this directly
Tested by
no test coverage detected