Skip to content

code/editor/FileIcon

import { … } from 'zidane-ui/code/editor'ui/src/code/editor/FileIcon.tsx

Components#

FileIconComponent#

A file's coloured icon, resolved from its name the way the Files tab resolves it. Decorative (aria-hidden).

TypeScript
const FileIcon: MemoExoticComponent<(__namedParameters: FileIconProps) => Element>

ui/src/code/editor/FileIcon.tsx:72

TreeChevronComponent#

The tree's folder chevron (points down; turned to point right while closed).

TypeScript
function TreeChevron(props: TreeChevronProps): Element
Parameters
NameTypeDescription
propsTreeChevronProps

open: whether the folder is expanded; className: extra classes on the svg.

Element
TreeChevron props
NameTypeDescription
className?string

Extra classes on the svg.

openboolean

The folder is expanded: the chevron points down.

style?CSSProperties

Inline styles on the root element, merged after the component's own.

ui/src/code/editor/FileIcon.tsx:45

Interfaces#

FileIconPropsInterface#

Props for FileIcon.

TypeScript
interface FileIconProps
FileIconProps properties
NameTypeDescription
className?string

Extra classes on the root element.

pathstring

The file's path or name; its icon is resolved from it.

style?CSSProperties

Inline styles on the root element, merged after the component's own.

ui/src/code/editor/FileIcon.tsx:62

TreeChevronPropsInterface#

Props for TreeChevron.

TypeScript
interface TreeChevronProps
TreeChevronProps properties
NameTypeDescription
className?string

Extra classes on the svg.

openboolean

The folder is expanded: the chevron points down.

style?CSSProperties

Inline styles on the root element, merged after the component's own.

ui/src/code/editor/FileIcon.tsx:31