Line

You are reading docs for v0.8. See latest (v0.9)

ui/client/features/component-docs/components/ComponentSourcePanel

Cockpit client (features), v0.8. Source: ui/client/features/component-docs/components/ComponentSourcePanel.tsx.

Functions#

ComponentSourcePanel()#

ComponentSourcePanel(__namedParameters): Element

Defined in: ui/client/features/component-docs/components/ComponentSourcePanel.tsx:22

The file itself, as plain text: the source editor, then Review changes -> Confirm save (the diff comes from the server; nothing is written until it is confirmed). Presentation only.

Props#

Prop Type Required Default Description
path string Yes —
state EditState Yes —
diagnostics SourceDiagnostic[] Yes —
loading boolean Yes —
loadError `string null` Yes —
onEdit (draft: string) => void Yes —
onReview () => void Yes —
onCancelReview () => void Yes —
onConfirm () => void Yes —
onDiscard () => void Yes —
onReload () => void Yes —

Returns#

Element