Skip to content
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import figma from '@figma/code-connect';
import { ProgressStepper } from '@patternfly/react-core';

// Documentation for ProgressStepper can be found at https://www.patternfly.org/components/progress-stepper

figma.connect(
ProgressStepper,
'https://www.figma.com/design/VMEX8Xg2nzhBX8rfBx53jp/PatternFly-6--Components?node-id=7644-38563',
{
props: {
// enum
isCompact: figma.enum('Size', { Compact: true }),
isVertical: figma.enum('Direction', { Vertical: true }),

children: figma.children('Progress steps')
},
example: (props) => (
<ProgressStepper isVertical={props.isVertical} isCompact={props.isCompact} aria-label="Progress stepper">
{props.children}
</ProgressStepper>
)
}
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import figma from '@figma/code-connect';
import { ProgressStep } from '@patternfly/react-core';
import InProgressIcon from '@patternfly/react-icons/dist/esm/icons/in-progress-icon';

// Documentation for ProgressSteps can be found at https://www.patternfly.org/components/progress-steps

figma.connect(
ProgressStep,
'https://www.figma.com/design/VMEX8Xg2nzhBX8rfBx53jp/PatternFly-6--Components?node-id=7644-38618',
{
props: {
description: figma.boolean('Description', {
true: 'Step description',
false: undefined
}),
variant: figma.enum('State', {
Complete: 'success',
Info: 'info',
Pending: 'pending',
Warning: 'warning',
Danger: 'danger',
'Loading/Misc': 'loading'
}),
isCurrent: figma.enum('State', {
'Loading/Misc': true
}),
icon: figma.enum('State', {
'Loading/Misc': <InProgressIcon />,
false: undefined
})
},
example: (props) => (
<ProgressStep
aria-label="Step label"
description={props.description}
icon={props.icon}
id="basic-alignment-step"
isCurrent={props.isCurrent}
titleId="basic-alignment-step-title"
variant="success"
>
Title test
</ProgressStep>
)
}
);
13 changes: 5 additions & 8 deletions packages/code-connect/figma.config.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
{
"codeConnect": {
"parser": "react",
"include": [
"components/DatePicker/*.tsx",
"components/EmptyState/*.tsx",
"components/FileUpload/*.tsx",
"components/Hint/*.tsx",
"components/InlineEdit/*.tsx"
],
"include": ["components/ProgressStepper/*.figma.tsx"],
"documentUrlSubstitutions": {
"https://www.figma.com/design/VMEX8Xg2nzhBX8rfBx53jp/PatternFly-6--Components": "https://www.figma.com/design/VMEX8Xg2nzhBX8rfBx53jp/branch/9HiAevBhEc2iYY9rxZtovA/PatternFly-6--Components"
},
"paths": {
"src/components": "src/components"
},
Expand All @@ -30,4 +27,4 @@
}
}
}
}
}
Loading