Skip to content

Commit e1e4f71

Browse files
committed
feat(CC-batch-4): group review 4 followup
1 parent 0975f50 commit e1e4f71

File tree

5 files changed

+32
-27
lines changed

5 files changed

+32
-27
lines changed

packages/code-connect/components/DescriptionList/DescriptionListInCard.figma.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,11 @@ figma.connect(
1717
Default: 'lg',
1818
Large: '2xl'
1919
}),
20-
21-
isCompact: figma.enum('Card size', { Small: true }),
22-
isLarge: figma.enum('Card size', { Large: true }),
23-
24-
isHorizontal: figma.enum('Orientation', { Horizontal: true }),
25-
26-
children: figma.children('*')
20+
isHorizontal: figma.enum('Orientation', { Horizontal: true })
2721
},
2822
example: (props) => (
2923
<DescriptionList isHorizontal={props.isHorizontal} displaySize={props.displaySize}>
30-
<Card component="div" isCompact={props.isCompact} isLarge={props.isLarge}>
24+
<Card component="div">
3125
<DescriptionListTerm>Input label</DescriptionListTerm>
3226
<DescriptionListDescription>Description list item</DescriptionListDescription>
3327
</Card>

packages/code-connect/components/DescriptionList/TermLabel.figma.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ figma.connect(
1717
{
1818
variant: { 'Inline edit toggle': true, 'Has help text': false },
1919
props: {
20-
label: figma.string('✏️ Label'),
21-
children: figma.children('*')
20+
label: figma.string('✏️ Label')
2221
},
2322
example: (props) => (
2423
<DescriptionListTerm>
@@ -57,19 +56,21 @@ figma.connect(
5756
{
5857
variant: { 'Has help text': true, 'Inline edit toggle': false },
5958
props: {
59+
// string
60+
label: figma.string('✏️ Label'),
61+
62+
// enum
6063
icon: figma.enum('Icon ⎆', {
6164
true: <CodeBranchIcon />,
6265
false: undefined
63-
}),
64-
label: figma.string('✏️ Label'),
65-
children: figma.children('*')
66+
})
6667
},
6768
example: (props) => (
6869
<DescriptionListTermHelpText>
6970
<Popover headerContent={<div>{props.label}</div>} bodyContent={<div>This is the help text</div>}>
7071
<DescriptionListTermHelpTextButton>
72+
{props.icon}
7173
{props.label}
72-
{props.children}
7374
</DescriptionListTermHelpTextButton>
7475
</Popover>
7576
</DescriptionListTermHelpText>
Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
import figma from '@figma/code-connect';
2-
import { DualListSelectorListItem } from '@patternfly/react-core';
2+
import { DualListSelectorList, DualListSelectorTree } from '@patternfly/react-core';
33

44
// Documentation for DualListSelectorListItemTree can be found at https://www.patternfly.org/components/dual-list-selector
55

66
figma.connect(
7-
DualListSelectorListItem,
7+
DualListSelectorTree,
88
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=21279-116342',
99
{
1010
props: {
11-
children: figma.children('*')
11+
options: `DualListSelectorTreeItemData[] = buildOptions(isChosen, data, false)`
1212
},
13-
example: (props) => <DualListSelectorListItem>{props.children}</DualListSelectorListItem>
13+
example: (props) => (
14+
<DualListSelectorList>
15+
<DualListSelectorTree data={props.options} onOptionCheck={() => {}} />
16+
</DualListSelectorList>
17+
)
1418
}
1519
);

packages/code-connect/components/DualListSelector/DualListItemTypes.figma.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ figma.connect(
1010
props: {
1111
children: figma.children('*')
1212
},
13-
example: (props) => <div>{props.children}</div>
13+
example: (props) => <DualListSelectorListItem>{props.children}</DualListSelectorListItem>
1414
}
1515
);

packages/code-connect/components/DualListSelector/DualListSelector.figma.tsx

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,38 @@ import {
33
DualListSelectorList,
44
DualListSelectorPane,
55
DualListSelectorControl,
6-
DualListSelectorControlsWrapper
6+
DualListSelectorControlsWrapper,
7+
DualListSelectorListItem
78
} from '@patternfly/react-core';
89
import figma from '@figma/code-connect';
910
import AngleRightIcon from '@patternfly/react-icons/dist/esm/icons/angle-right-icon';
1011
import AngleDoubleRightIcon from '@patternfly/react-icons/dist/esm/icons/angle-double-right-icon';
1112
import AngleDoubleLeftIcon from '@patternfly/react-icons/dist/esm/icons/angle-double-left-icon';
1213
import AngleLeftIcon from '@patternfly/react-icons/dist/esm/icons/angle-left-icon';
1314

15+
// TODO: DESIGN: Dual list items types and tree setting should come from components
16+
// Documentation for DualListSelector can be found at https://www.patternfly.org/components/dual-list-selector
17+
1418
figma.connect(
1519
DualListSelector,
1620
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=29667-231683',
1721
{
18-
props: {
19-
children: figma.children('*')
20-
},
21-
example: (props) => (
22+
example: () => (
2223
<DualListSelector>
2324
<DualListSelectorPane
2425
title="Available options"
2526
// searchInput={() => {}}
2627
// actions={() => {}}
28+
// status={() => {}}
2729
listMinHeight="300px"
2830
isChosen
29-
// status={() => {}}
3031
>
31-
<DualListSelectorList>{props.children}</DualListSelectorList>
32+
<DualListSelectorList>
33+
<DualListSelectorListItem>Option 1</DualListSelectorListItem>
34+
<DualListSelectorListItem>Option 2</DualListSelectorListItem>
35+
<DualListSelectorListItem>Option 3</DualListSelectorListItem>
36+
<DualListSelectorListItem>Option 4</DualListSelectorListItem>
37+
</DualListSelectorList>
3238
</DualListSelectorPane>
3339

3440
<DualListSelectorControlsWrapper>
@@ -58,7 +64,7 @@ figma.connect(
5864
/>
5965
</DualListSelectorControlsWrapper>
6066
<DualListSelectorPane title="Choose options">
61-
<DualListSelectorList>{props.children}</DualListSelectorList>
67+
<DualListSelectorList></DualListSelectorList>
6268
</DualListSelectorPane>
6369
</DualListSelector>
6470
)

0 commit comments

Comments
 (0)