ui/client/features/pages-editor/hooks/usePaletteInsert
Cockpit client (features), next. Source: ui/client/features/pages-editor/hooks/usePaletteInsert.tsx.
Functions#
usePaletteInsert()#
usePaletteInsert(
feature,file,contentHash,onInserted):object
Defined in: ui/client/features/pages-editor/hooks/usePaletteInsert.tsx:13
(Slice 2 of 's design) -- click a Component/Provider Palette entry to insert its real import + usage at the end of the currently open page. Tracks which single entry (if any) is mid-insert, so only that row shows a busy state, and the last insert's outcome for the panel's own status line.
Parameters#
feature
string
file
string
contentHash
string
onInserted
(tree) => void
Returns#
object
insert
insert: (
kind,entry) =>Promise<void>
Parameters
kind
entry
Returns
Promise<void>
isPending
isPending: (
kind,entry) =>boolean
Parameters
kind
entry
Returns
boolean
status
status:
StatusMessage|null