zidane-ui/ settings/ demos
import { … } from 'zidane-ui/settings/demos'ui/src/settings/demos/index.ts
Components#
ApprovalDemoComponent#
Renders the demo of an approval mode.
function ApprovalDemo(props: ApprovalDemoProps): ElementParameters
| Name | Type | Description |
|---|---|---|
| props | ApprovalDemoProps | Component props. |
Returns
ElementConversationPresetPreviewComponent#
zidane-ui/settings/demos: the settings' previews and mini demos, for a
page that shows them on their own (a gallery). The mini demos are small
decorative scenes of what a feature, an extension or an approval mode does;
the tutorial scenes are one per topic, each taking the step on show; the
conversation preview draws a transcript in the settings it is given. They
are kept off zidane-ui/settings, whose pages load them on demand, so the
settings screen doesn't carry the transcript and every scene up front.
function ConversationPresetPreview(props: ConversationPresetPreviewProps): ElementParameters
| Name | Type | Description |
|---|---|---|
| props | ConversationPresetPreviewProps | Component props. |
Returns
ElementProps
| Name | Type | Description |
|---|---|---|
| className? | string | Extra classes on the block. |
| maxHeight? | number | The height of the preview's scroller, in pixels. |
| onApply | (preset: TranscriptPresetId) => void | Applies a preset: every setting of |
| settings | Partial<Settings> | The settings in effect. |
| style? | CSSProperties | Inline styles on the root element. |
ConversationPreviewComponent#
zidane-ui/settings/demos: the settings' previews and mini demos, for a
page that shows them on their own (a gallery). The mini demos are small
decorative scenes of what a feature, an extension or an approval mode does;
the tutorial scenes are one per topic, each taking the step on show; the
conversation preview draws a transcript in the settings it is given. They
are kept off zidane-ui/settings, whose pages load them on demand, so the
settings screen doesn't carry the transcript and every scene up front.
function ConversationPreview(props: ConversationPreviewProps): ElementParameters
| Name | Type | Description |
|---|---|---|
| props | ConversationPreviewProps | Component props. |
Returns
ElementProps
| Name | Type | Description |
|---|---|---|
| className? | string | Extra classes on the window. |
| maxHeight? | number | The height of the window's scroller, in pixels. |
| settings | Partial<Settings> | The settings to draw the sample with. |
| style? | CSSProperties | Inline styles on the root element. |
| title? | string | The caption of the window. Defaults to the |
ExtensionDemoComponent#
Renders the demo of a native extension, or nothing for an extension without one.
function ExtensionDemo(props: ExtensionDemoProps): Element | nullParameters
| Name | Type | Description |
|---|---|---|
| props | ExtensionDemoProps | Component props. |
Returns
Element | nullFeatureDemoComponent#
Renders the demo of a feature, or nothing for a feature without one.
function FeatureDemo(props: FeatureDemoProps): Element | nullParameters
| Name | Type | Description |
|---|---|---|
| props | FeatureDemoProps | Component props. |
Returns
Element | nullSandboxDemoComponent#
Renders the sandbox demo: the project allowed, ~/.ssh blocked.
function SandboxDemo(props: DemoProps): ElementParameters
| Name | Type | Description |
|---|---|---|
| props | DemoProps | Component props. |
Returns
ElementProps
| Name | Type | Description |
|---|---|---|
| className? | string | Extra classes on the root element. |
| on | boolean | The switch is on: the demo plays. Off: it dims and stands still. |
| style? | CSSProperties | Inline styles on the root element. |
Constants#
TUTORIAL_SCENESConstant#
The scene of each tutorial.
const TUTORIAL_SCENES: Readonly<Record<TutorialTopic, ComponentType<SceneProps>>>Interfaces#
ConversationPresetPreviewPropsInterface#
Props of ConversationPresetPreview.
interface ConversationPresetPreviewPropsProperties
| Name | Type | Description |
|---|---|---|
| className? | string | Extra classes on the block. |
| maxHeight? | number | The height of the preview's scroller, in pixels. |
| onApply | (preset: TranscriptPresetId) => void | Applies a preset: every setting of |
| settings | Partial<Settings> | The settings in effect. |
| style? | CSSProperties | Inline styles on the root element. |
ConversationPreviewPropsInterface#
Props of ConversationPreview.
interface ConversationPreviewPropsProperties
| Name | Type | Description |
|---|---|---|
| className? | string | Extra classes on the window. |
| maxHeight? | number | The height of the window's scroller, in pixels. |
| settings | Partial<Settings> | The settings to draw the sample with. |
| style? | CSSProperties | Inline styles on the root element. |
| title? | string | The caption of the window. Defaults to the |
DemoPropsInterface#
What every demo takes: whether the switch it shows is on.
interface DemoPropsProperties
| Name | Type | Description |
|---|---|---|
| className? | string | Extra classes on the root element. |
| on | boolean | The switch is on: the demo plays. Off: it dims and stands still. |
| style? | CSSProperties | Inline styles on the root element. |
ScenePropsInterface#
What every tutorial scene takes.
interface ScenePropsProperties
| Name | Type | Description |
|---|---|---|
| className? | string | Extra classes on the root element. |
| step | number | The step on show, from 0. |
| style? | CSSProperties | Inline styles on the root element. |
Types#
FeatureDemoIdType#
What a feature demo can show: a setting's key, or the app's motion (Appearance › Motion, not a table row).
type FeatureDemoId = BooleanSettingKey | 'motion'