-
Notifications
You must be signed in to change notification settings - Fork 368
feat(CC-batch-2): added batch 2 #11828
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 all commits
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,47 @@ | ||
import figma from '@figma/code-connect'; | ||
import { Alert } from '@patternfly/react-core'; | ||
|
||
/** | ||
* PatternFly Alert component integration for Figma Code Connect | ||
*/ | ||
|
||
figma.connect( | ||
Alert, | ||
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=1110-2698&m=dev', | ||
{ | ||
props: { | ||
// booleans | ||
description: figma.boolean('Description', { | ||
true: figma.string('✏️ Description'), | ||
false: undefined | ||
}), | ||
hasActions: figma.boolean('Actions'), | ||
isDismissable: figma.boolean('Dismissable'), | ||
isExpandable: figma.boolean('Expandable'), | ||
|
||
// strings | ||
title: figma.string('✏️ Title'), | ||
|
||
// enums | ||
variant: figma.enum('Type', { | ||
Info: 'info', | ||
Success: 'success', | ||
Warning: 'warning', | ||
Danger: 'danger', | ||
Custom: 'custom' | ||
}) | ||
}, | ||
example: (props) => ( | ||
<Alert | ||
actionClose={props.isDismissable} | ||
actionLinks={props.hasActions} | ||
isExpandable={props.isExpandable} | ||
isInline | ||
title={props.title} | ||
variant={props.variant} | ||
> | ||
{props.description} | ||
</Alert> | ||
) | ||
} | ||
); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import figma from '@figma/code-connect'; | ||
import { AlertGroup } from '@patternfly/react-core'; | ||
|
||
/** | ||
* PatternFly Alert component integration for Figma Code Connect | ||
*/ | ||
|
||
figma.connect( | ||
AlertGroup, | ||
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=1110-2780&m=dev', | ||
{ | ||
props: { | ||
// children | ||
children: figma.children('*') | ||
}, | ||
example: (props) => <AlertGroup>{props.children}</AlertGroup> | ||
} | ||
); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import figma from '@figma/code-connect'; | ||
import { Alert } from '@patternfly/react-core'; | ||
|
||
/** | ||
* PatternFly Alert component integration for Figma Code Connect | ||
*/ | ||
|
||
figma.connect( | ||
Alert, | ||
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=1110-2754&m=dev', | ||
{ | ||
props: { | ||
// strings | ||
title: figma.string('✏️ Title'), | ||
|
||
// variants | ||
variant: figma.enum('Type', { | ||
Info: 'info', | ||
Success: 'success', | ||
Warning: 'warning', | ||
Danger: 'danger', | ||
Custom: 'custom' | ||
}), | ||
|
||
// children | ||
children: figma.children('*') | ||
}, | ||
example: (props) => ( | ||
<Alert variant={props.variant} title={props.title} variantLabel={props.variant} isInline isPlain /> | ||
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. Do we need separate code connect files for inline alert & plain inline alert or could these be combined with boolean flags for both |
||
) | ||
} | ||
); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import figma from '@figma/code-connect'; | ||
import { AlertGroup } from '@patternfly/react-core'; | ||
|
||
/** | ||
* PatternFly Alert component integration for Figma Code Connect | ||
*/ | ||
|
||
figma.connect( | ||
AlertGroup, | ||
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=1110-2784&m=dev', | ||
{ | ||
props: { | ||
// strings | ||
overflowMessage: figma.string('✏️ Title'), | ||
|
||
children: figma.children('*') | ||
}, | ||
example: (props) => <AlertGroup overflowMessage={props.overflowMessage}>{props.children}</AlertGroup> | ||
} | ||
); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import figma from '@figma/code-connect'; | ||
import { Alert } from '@patternfly/react-core'; | ||
|
||
/** | ||
* PatternFly Alert component integration for Figma Code Connect | ||
*/ | ||
|
||
figma.connect( | ||
Alert, | ||
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=1110-2587&m=dev', | ||
{ | ||
props: { | ||
// booleans | ||
actionLinks: figma.boolean('Actions'), | ||
alertDescription: figma.boolean('Description', { | ||
true: figma.string('✏️ Description'), | ||
false: undefined | ||
}), | ||
isExpandable: figma.boolean('Expandable'), | ||
|
||
// strings | ||
title: figma.string('✏️ Title'), | ||
|
||
// variants | ||
variant: figma.enum('Type', { | ||
Custom: 'custom', | ||
Danger: 'danger', | ||
Info: 'info', | ||
Success: 'success', | ||
Warning: 'warning' | ||
}) | ||
}, | ||
example: (props) => ( | ||
<Alert | ||
title={props.title} | ||
variant={props.variant} | ||
actionLinks={props.actionLinks} | ||
isExpandable={props.isExpandable} | ||
> | ||
{props.alertDescription} | ||
</Alert> | ||
) | ||
} | ||
); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import figma from '@figma/code-connect'; | ||
import { AlertGroup } from '@patternfly/react-core'; | ||
|
||
/** | ||
* PatternFly AlertGroup component integration for Figma Code Connect | ||
*/ | ||
|
||
figma.connect( | ||
AlertGroup, | ||
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=1110-2821&m=dev', | ||
{ | ||
props: { | ||
children: figma.children('*') | ||
}, | ||
example: (props) => <AlertGroup>{props.children}</AlertGroup> | ||
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. this AlertGroup should have |
||
} | ||
); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import figma from '@figma/code-connect'; | ||
import { Avatar } from '@patternfly/react-core'; | ||
|
||
/** | ||
* PatternFly Avatar component integration for Figma Code Connect | ||
*/ | ||
|
||
figma.connect( | ||
Avatar, | ||
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6%3A-Components-Test?node-id=1561-4342&m=dev', | ||
{ | ||
props: { | ||
// booleans | ||
isBordered: figma.boolean('Bordered'), | ||
|
||
// enums | ||
size: figma.enum('Size', { | ||
small: 'sm', | ||
med: 'md', | ||
lg: 'lg', | ||
XL: 'xl' | ||
}) | ||
}, | ||
example: (props) => ( | ||
<Avatar alt="Avatar" src="/assets/images/avatar.svg" isBordered={props.isBordered} size={props.size} /> | ||
) | ||
} | ||
); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { BackToTop } from '@patternfly/react-core'; | ||
import figma from '@figma/code-connect'; | ||
|
||
figma.connect( | ||
BackToTop, | ||
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=1521-958&m=dev', | ||
{ | ||
props: { | ||
// strings | ||
text: figma.string('Text') | ||
}, | ||
example: (props) => <BackToTop title={props.text} /> | ||
} | ||
); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import figma from '@figma/code-connect'; | ||
import { Backdrop } from '@patternfly/react-core'; | ||
|
||
/** | ||
* PatternFly Backdrop component integration for Figma Code Connect | ||
*/ | ||
|
||
figma.connect( | ||
Backdrop, | ||
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6%3A-Components-Test?node-id=2873-2900&m=dev', | ||
{ | ||
example: () => <Backdrop /> | ||
} | ||
); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import figma from '@figma/code-connect'; | ||
import { Badge } from '@patternfly/react-core'; | ||
|
||
/** | ||
* PatternFly Badge component integration for Figma Code Connect | ||
*/ | ||
|
||
figma.connect( | ||
Badge, | ||
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=1259-1132&m=dev', | ||
{ | ||
props: { | ||
// strings | ||
title: figma.string('Text'), | ||
|
||
// enums | ||
isRead: figma.enum('Type', { | ||
Read: true | ||
}), | ||
isDisabled: figma.enum('Type', { | ||
disabled: true | ||
}) | ||
}, | ||
example: (props) => <Badge title={props.title} isRead={props.isRead} isDisabled={props.isDisabled} /> | ||
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. There is no 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. It may also be worth stubbing out the |
||
} | ||
); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"codeConnect": { | ||
"parser": "react", | ||
"include": [ | ||
"components/Alert/*.tsx", | ||
"components/Avatar/*.tsx", | ||
"components/Backdrop/*.tsx", | ||
"components/BackToTop/*.tsx", | ||
"components/Badge/*.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.
These AlertGroups should have
isLiveRegion
andhasAnimations
if they could appear on the page. They don't need these props if they are present on page load and cannot be dismissed.