-
Notifications
You must be signed in to change notification settings - Fork 371
feat(CC-batch-1): added batch 1 #11827
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
base: main
Are you sure you want to change the base?
Changes from 2 commits
e49f563
9f6488f
8c034f0
79a0a79
eae1820
a366810
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import figma from '@figma/code-connect'; | ||
import { AboutModal } from '@patternfly/react-core'; | ||
|
||
/** | ||
* PatternFly About Modal component integration for Figma Code Connect | ||
*/ | ||
|
||
figma.connect( | ||
AboutModal, | ||
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=2879-13973&t=15CEJpGgVui7qP5Q-11', | ||
{ | ||
props: { | ||
// string | ||
productName: figma.string('Product name'), | ||
|
||
children: figma.children('*') | ||
}, | ||
example: (props) => ( | ||
<AboutModal | ||
productName={props.productName} | ||
trademark="Copyright © 2024" | ||
brandImageSrc="Brand Image Source" | ||
brandImageAlt="Brand Image Alt Text" | ||
backgroundImageSrc="/assets/images/background.png" | ||
> | ||
{props.children} | ||
</AboutModal> | ||
) | ||
} | ||
); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import figma from '@figma/code-connect'; | ||
import { Accordion } from '@patternfly/react-core'; | ||
|
||
/** | ||
* PatternFly Accordion component integration for Figma Code Connect | ||
*/ | ||
|
||
figma.connect( | ||
Accordion, | ||
'https://www.figma.com/file/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6%3A-Components-Test?node-id=2621-623', | ||
{ | ||
props: { | ||
// enum | ||
displaySize: figma.enum('Type', { | ||
'Large Bordered': 'lg' | ||
}), | ||
isBordered: figma.enum('Type', { | ||
Bordered: true, | ||
'Large Bordered': true | ||
}), | ||
togglePosition: figma.enum('Caret position', { | ||
Left: 'start' | ||
}), | ||
|
||
children: figma.children('*') | ||
}, | ||
example: (props) => ( | ||
<Accordion togglePosition={props.togglePosition} isBordered={props.isBordered} displaySize={props.displaySize}> | ||
{props.children} | ||
</Accordion> | ||
) | ||
} | ||
); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import figma from '@figma/code-connect'; | ||
import { AccordionItem, AccordionToggle, AccordionContent } from '@patternfly/react-core'; | ||
|
||
/** | ||
* PatternFly Accordion component integration for Figma Code Connect | ||
*/ | ||
|
||
figma.connect( | ||
AccordionToggle, | ||
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=1423-687&m=dev', | ||
{ | ||
props: { | ||
// string | ||
expandText: figma.string('Expand Text'), | ||
|
||
// enums | ||
toggleTextExpanded: figma.enum('State', { | ||
Default: figma.string('Toggle Text'), | ||
Hover: figma.string('Toggle Text'), | ||
Expanded: figma.string('Toggle Text Expanded') | ||
}), | ||
|
||
// enum | ||
isExpanded: figma.enum('State', { | ||
Expanded: true | ||
}), | ||
|
||
children: figma.children('*') | ||
}, | ||
example: (props) => ( | ||
<AccordionItem isExpanded={props.isExpanded}> | ||
<AccordionToggle>{props.toggleTextExpanded}</AccordionToggle> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The AccordionToggle should have an There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd also add a comment here recommending they implement an There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. +1 |
||
<AccordionContent> | ||
<p>{props.expandText}</p> | ||
</AccordionContent> | ||
</AccordionItem> | ||
) | ||
} | ||
); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import figma from '@figma/code-connect'; | ||
import { ActionList } from '@patternfly/react-core'; | ||
|
||
/** | ||
* PatternFly ActionList integration for Figma Code Connect | ||
*/ | ||
|
||
figma.connect( | ||
ActionList, | ||
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=6780-15839&m=dev', | ||
{ | ||
props: { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure if it's worth adding the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can look for |
||
children: figma.children('*') | ||
}, | ||
example: (props) => <ActionList>{props.children}</ActionList> | ||
} | ||
); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import figma from '@figma/code-connect'; | ||
import { BackgroundImage } from '@patternfly/react-core'; | ||
|
||
/** | ||
* PatternFly BackgroundImage component integration for Figma Code Connect | ||
*/ | ||
|
||
figma.connect( | ||
BackgroundImage, | ||
'https://www.figma.com/file/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6%3A-Components-Test?node-id=5047-695', | ||
{ | ||
props: {}, | ||
example: () => <BackgroundImage src="/assets/images/pf-background.svg" /> | ||
} | ||
); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import figma from '@figma/code-connect'; | ||
import { ClipboardCopy } from '@patternfly/react-core'; | ||
|
||
/** | ||
* PatternFly ClipboardCopyInlineCompact component integration for Figma Code Connect | ||
*/ | ||
|
||
figma.connect( | ||
ClipboardCopy, | ||
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=9914-75835&m=dev', | ||
{ | ||
props: { | ||
// enum | ||
isActive: figma.enum('State', { Active: true }), | ||
isReadOnly: figma.enum('State', { 'Read only': true }), | ||
isExpanded: figma.enum('State', { Expanded: true }), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is there a way in figma to make an expandable clipboardCopy variant? If so, then There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can create an expansion var that references
|
||
|
||
children: figma.children('*') | ||
}, | ||
example: (props) => ( | ||
<ClipboardCopy isReadOnly={props.isReadOnly} isExpanded={props.isExpanded} isActive={props.isActive}> | ||
{props.children} | ||
</ClipboardCopy> | ||
) | ||
} | ||
); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import figma from '@figma/code-connect'; | ||
import { ClipboardCopy } from '@patternfly/react-core'; | ||
|
||
/** | ||
* PatternFly ClipboardCopyInlineCompact component integration for Figma Code Connect | ||
*/ | ||
|
||
figma.connect( | ||
ClipboardCopy, | ||
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=9914-75768&m=dev', | ||
{ | ||
props: { | ||
children: figma.children('*') | ||
}, | ||
example: (props) => <ClipboardCopy variant="inline-compact">{props.children}</ClipboardCopy> | ||
} | ||
); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"codeConnect": { | ||
"parser": "react", | ||
"include": [ | ||
"components/AboutModal/*.tsx", | ||
"components/Accordion/*.tsx", | ||
"components/ActionList/*.tsx", | ||
"components/BackgroundImage/*.tsx", | ||
"components/ClipboardCopy/*.tsx" | ||
], | ||
"paths": { | ||
"src/components": "src/components" | ||
}, | ||
"aliases": { | ||
"@patternfly/react-core": "." | ||
}, | ||
"importPaths": { | ||
"src/components": "src/components" | ||
}, | ||
"options": { | ||
"instanceSwapper": { | ||
"enabled": true | ||
}, | ||
"development": { | ||
"enabled": true, | ||
"verbose": true | ||
}, | ||
"production": { | ||
"enabled": false | ||
} | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can this be updated to be
so that the about modal can be toggled open and closed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nicolethoen I tested this, it throws validation errors and can't be used.