({item, isCopied = false}: {item: (typeof iconList)[number]; isCopied?: boolean})
| 180 | } |
| 181 | |
| 182 | function IconItem({item, isCopied = false}: {item: (typeof iconList)[number]; isCopied?: boolean}) { |
| 183 | let Icon = item.icon; |
| 184 | let ref = useRef(null); |
| 185 | return ( |
| 186 | <ListBoxItem |
| 187 | id={item.id} |
| 188 | value={item} |
| 189 | textValue={item.id} |
| 190 | className={itemStyle} |
| 191 | ref={ref} |
| 192 | style={pressScale(ref)}> |
| 193 | {isCopied ? ( |
| 194 | <CheckmarkCircle styles={iconStyle({size: 'XL'})} /> |
| 195 | ) : ( |
| 196 | <Icon styles={iconStyle({size: 'XL'})} /> |
| 197 | )} |
| 198 | <div |
| 199 | className={style({ |
| 200 | maxWidth: '100%', |
| 201 | textOverflow: 'ellipsis', |
| 202 | overflow: 'hidden', |
| 203 | whiteSpace: 'nowrap' |
| 204 | })}> |
| 205 | {isCopied ? 'Copied!' : item.id} |
| 206 | </div> |
| 207 | </ListBoxItem> |
| 208 | ); |
| 209 | } |
| 210 | |
| 211 | export function SkeletonIconItem({item}: {item: {id: string}}) { |
| 212 | const PlaceholderIcon = Close; |
nothing calls this directly
no test coverage detected