Skip to content

feat(CC-wizard): added and validated wizard #11887

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions packages/code-connect/components/Wizard/WizardBasicModal.figma.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import figma from '@figma/code-connect';
import {
Drawer,
DrawerContent,
DrawerContentBody,
Modal,
ModalVariant,
Wizard,
WizardHeader
} from '@patternfly/react-core';

// TODO: FIGMA: Update left panel to a semantic name or component
// TODO: FIGMA: Add 'Wizard step content' prop to Wizard Step Item
// Documentation for Wizard can be found at https://www.patternfly.org/components/wizard

figma.connect(
Wizard,
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=14628-18627',
{
props: {
children: figma.children('Wizard step item')
},
example: (props) => (
<Modal isOpen={true} aria-label="Wizard modal" variant={ModalVariant.medium} onEscapePress={() => {}}>
<Drawer isExpanded={true} onExpand={() => {}}>
<DrawerContent panelContent="Panel content">
<DrawerContentBody>
<Wizard
height={400}
title="Header wizard"
header={
<WizardHeader
title="Wizard header title"
description="Wizard header description"
closeButtonAriaLabel="Close header"
/>
}
>
{props.children}
</Wizard>
</DrawerContentBody>
</DrawerContent>
</Drawer>
</Modal>
)
}
);
17 changes: 17 additions & 0 deletions packages/code-connect/components/Wizard/WizardInPage.figma.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import figma from '@figma/code-connect';
import { Wizard } from '@patternfly/react-core';

// TODO: FIGMA: Update left panel to a semantic name or component
// TODO: FIGMA: Add 'Wizard step content' prop to Wizard Step Item
// Documentation for Wizard can be found at https://www.patternfly.org/components/wizard

figma.connect(
Wizard,
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=14628-23799',
{
props: {
children: figma.children('Wizard step item')
},
example: (props) => <Wizard>{props.children}</Wizard>
}
);
51 changes: 51 additions & 0 deletions packages/code-connect/components/Wizard/WizardStepItem.figma.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import figma from '@figma/code-connect';
import { WizardStep } from '@patternfly/react-core';

// TODO: FIGMA: Add "With drawer" should be an enum if we expect to conditionally render the variant
// Documentation for WizardStep can be found at https://www.patternfly.org/components/wizard

figma.connect(
WizardStep,
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=14628-17356',
{
props: {
// string
name: figma.string('✏️ Nav item'),

// boolean
isExpandable: figma.boolean('Expandable'),

// enum
isDisabled: figma.enum('State', {
Disabled: true,
Enabled: false
}),

hasSteps: figma.enum('Expansion', {
'No expansion': undefined,
'Expandable - Open': [
<WizardStep name="Substep A" id="expand-steps-sub-a" key="expand-steps-sub-a">
Substep A content
</WizardStep>,
<WizardStep name="Substep B" id="expand-steps-sub-b" key="expand-steps-sub-b">
Substep B content
</WizardStep>
],
'Expandable - Close': undefined
})

// children
},
example: (props) => (
<WizardStep
isDisabled={props.isDisabled}
isExpandable={props.isExpandable}
name={props.name}
id="<your-id>"
steps={props.hasSteps}
>
Step content
</WizardStep>
)
}
);
Loading