Skip to content

Commit 358ca97

Browse files
committed
updates delete-wizard changeset
1 parent 143689a commit 358ca97

File tree

2 files changed

+54
-1
lines changed

2 files changed

+54
-1
lines changed

.changeset/delete-wizard.md

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,56 @@
22
'@lg-templates/delete-wizard': minor
33
---
44

5-
Initial release of `DeleteWizard`
5+
Initial release of `DeleteWizard`.
6+
7+
```tsx
8+
<DeleteWizard>
9+
<DeleteWizard.Header
10+
pageTitle="Demo Delete Wizard"
11+
/>
12+
<DeleteWizard.Step requiresAcknowledgement>
13+
<DeleteWizard.StepContent>
14+
<div>Step 1 contents<div>
15+
</DeleteWizard.StepContent>
16+
<DeleteWizard.Footer
17+
primaryButtonProps={{
18+
children: 'Continue to next step',
19+
}}
20+
/>
21+
</DeleteWizard.Step>
22+
23+
<DeleteWizard.Step requiresAcknowledgement>
24+
<DeleteWizard.StepContent>
25+
<div>Step 2 contents<div>
26+
</DeleteWizard.StepContent>
27+
<DeleteWizard.Footer
28+
primaryButtonProps={{
29+
leftGlyph: <TrashIcon />,
30+
variant: 'danger',
31+
children: 'Delete my thing',
32+
onClick: handleDelete,
33+
}}
34+
/>
35+
</DeleteWizard.Step>
36+
</DeleteWizard>
37+
```
38+
39+
### DeleteWizard
40+
Establishes a context, and only renders the `activeStep` (managed internally, or provided with the `activeStep` prop). Accepts a `DeleteWizard.Header` and any number of `DeleteWizard.Step`s as children.
41+
42+
`DeleteWizard` and all sub-components include template styling.
43+
44+
45+
### DeleteWizard.Header
46+
A convenience wrapper around `CanvasHeader`
47+
48+
### DeleteWizard.Step
49+
A convenience wrapper around `Wizard.Step` to ensure the correct context.
50+
Like the basic `Wizard.Step`, of `requiresAcknowledgement` is true, the step must have `isAcknowledged` set in context, (or passed in as a controlled prop) for the Footer's primary button to be enabled. (see the Wizard and DeleteWizard demos in Storybook)
51+
52+
53+
### DeleteWizard.StepContent
54+
A styled `div` for use inside a `DeleteWizard.Step` to ensure proper page scrolling and footer positioning
55+
56+
### DeleteWizard.Footer
57+
A wrapper around Wizard.Footer with embedded styles for the DeleteWizard template

.changeset/wizard.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Initial Wizard package release.
3232
The `Wizard` component establishes a context with an internal state, and will render only the `activeStep`.
3333

3434
You can also control the Wizard externally using the `activeStep` and `onStepChange` callback.
35+
3536
Note: if you externally control the state, you opt out of the automatic range validation, and you must ensure that the provided `activeStep` index is valid relative to the `Wizard.Step`s provided.
3637

3738
### Wizard.Step

0 commit comments

Comments
 (0)