(props)
| 9 | } |
| 10 | |
| 11 | export const FileIcon: Component<FileIconProps> = (props) => { |
| 12 | const [local, rest] = splitProps(props, ["node", "class", "classList", "expanded"]) |
| 13 | const name = createMemo(() => chooseIconName(local.node.path, local.node.type, local.expanded || false)) |
| 14 | return ( |
| 15 | <svg |
| 16 | data-component="file-icon" |
| 17 | {...rest} |
| 18 | classList={{ |
| 19 | ...(local.classList ?? {}), |
| 20 | [local.class ?? ""]: !!local.class, |
| 21 | }} |
| 22 | > |
| 23 | <use href={`${sprite}#${name()}`} /> |
| 24 | </svg> |
| 25 | ) |
| 26 | } |
| 27 | |
| 28 | type IconMaps = { |
| 29 | fileNames: Record<string, IconName> |
nothing calls this directly
no test coverage detected