SessionHeader
API reference and demos for SessionHeader.
Import
Section titled “Import”import { SessionHeader } from "@flanksource/clicky-ui/rpc";The props table documents the component-specific surface. Standard DOM attributes inherited from React, such as className, event handlers, and accessibility attributes, may also be accepted when the component’s prop type extends a native element.
| Prop | Type | Default | Description |
|---|---|---|---|
actionError |
unknown |
— | The last control request's failure (useSession's `actionError`); rendered until the next action. |
className |
string |
— | — |
durationPresetsMs |
readonly number[] |
[5 * MINUTE, 15 * MINUTE, HOUR] |
Durations offered by the Extend and Restart prompts. |
getSessionHref* |
(…) => string |
— | Route of another session's page, for `restartOf` / `restartedAs` links. |
mutating |
boolean |
false |
The session's kind changes the target's behaviour (a class patch, say): Stop, Extend and Restart each wait for confirmation first. |
onExtend* |
(…) => void |
— | — |
onRestart* |
(…) => void |
— | Called with the run's own `params.durationMs`, or the duration picked when it had none. |
onStop* |
(…) => void |
— | — |
pendingAction |
SessionAction | null |
null |
The control request in flight (useSession's `pendingAction`). |
renderConfirm |
(…) => ReactNode |
— | Confirmation slot for a mutating kind. Defaults to a small modal. |
renderLink |
RenderLink |
({ to, children, className, title, key }) => ( <a key={key} href={to} className={className} title={title}> {children} </a> ) |
Renders those links with the host's router. Defaults to a plain anchor. |
session* |
SessionInfo |
— | — |
title |
ReactNode |
— | Heading; defaults to `labels.label`, then the profile. |