code/editor/DiagnosticsChip
import { … } from 'zidane-ui/code/editor'ui/src/code/editor/DiagnosticsChip.tsx
Components#
DiagnosticsChipComponent#
Shows a file's check state in its header: a spinner, a check mark, counts by severity, or a dashed or warning circle when nothing checks the file or every check failed.
function DiagnosticsChip(props: DiagnosticsChipProps): ElementParameters
| Name | Type | Description |
|---|---|---|
| props | DiagnosticsChipProps |
|
Returns
ElementProps
| Name | Type | Description |
|---|---|---|
| className? | string | Extra classes on the root element. |
| items | readonly EditorDiagnostic[] | The file's findings, counted by severity. |
| label | string | The tooltip and the accessible name. |
| onClick? | () => void | Called when the chip is pressed, for example to open the findings. |
| state | DiagnosticsChipState | Where checking stands. Counts show only while |
| style? | CSSProperties | Inline styles on the root element, merged after the component's own. |
Interfaces#
DiagnosticsChipPropsInterface#
Props for DiagnosticsChip.
interface DiagnosticsChipPropsProperties
| Name | Type | Description |
|---|---|---|
| className? | string | Extra classes on the root element. |
| items | readonly EditorDiagnostic[] | The file's findings, counted by severity. |
| label | string | The tooltip and the accessible name. |
| onClick? | () => void | Called when the chip is pressed, for example to open the findings. |
| state | DiagnosticsChipState | Where checking stands. Counts show only while |
| style? | CSSProperties | Inline styles on the root element, merged after the component's own. |
Types#
DiagnosticsChipStateType#
running: a check is under way. checked: something checked the file
(counts, or a check mark when clean). idle: nothing checks this file.
failed: every check failed.
type DiagnosticsChipState = 'running' | 'checked' | 'idle' | 'failed'