Skip to content

Commit 5fa8d87

Browse files
committed
feat(CC-expandable-section): group review 4 followup
1 parent 4e730cd commit 5fa8d87

File tree

3 files changed

+31
-24
lines changed

3 files changed

+31
-24
lines changed

packages/code-connect/components/ExpandableSection/ExandableSectionTruncate.figma.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@ figma.connect(
1212
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=2769-146',
1313
{
1414
props: {
15-
toggleText: figma.string('Toggle Text More')
15+
toggleText: figma.string('Toggle Text More'),
16+
isExpanded: false
1617
},
1718
example: (props) => (
1819
<ExpandableSection
19-
isExpanded={isExpanded}
20+
isExpanded={props.isExpanded}
2021
onToggle={() => {}}
21-
toggleText={isExpanded ? 'Show less basic example content' : `${props.toggleText}`}
22+
toggleText={props.isExpanded ? 'Show less basic example content' : `${props.toggleText}`}
2223
>
2324
This content is visible only when the component is expanded.
2425
</ExpandableSection>
@@ -33,13 +34,14 @@ figma.connect(
3334
variant: { State: 'Expanded' },
3435
props: {
3536
toggleText: figma.string('Toggle Text Less'),
36-
defaultContentSectionText: figma.string('Default Truncate Text')
37+
defaultContentSectionText: figma.string('Default Truncate Text'),
38+
isExpanded: true
3739
},
3840
example: (props) => (
3941
<ExpandableSection
40-
isExpanded={isExpanded}
42+
isExpanded={props.isExpanded}
4143
onToggle={() => {}}
42-
toggleText={isExpanded ? 'Show less basic example content' : `${props.toggleText}`}
44+
toggleText={props.isExpanded ? 'Show less basic example content' : `${props.toggleText}`}
4345
variant="truncate"
4446
>
4547
{props.defaultContentSectionText}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ figma.connect(
124124
{
125125
variant: { State: 'Default Custom Content' },
126126
example: () => (
127-
<ExpandableSection toggleContent={customToggleContent} isExpanded={isExpanded} onToggle={() => {}}>
127+
<ExpandableSection toggleContent={customToggleContent} isExpanded={false} onToggle={() => {}}>
128128
This content is visible only when the component is expanded.
129129
</ExpandableSection>
130130
)
@@ -137,7 +137,7 @@ figma.connect(
137137
{
138138
variant: { State: 'Expanded Custom Content' },
139139
example: () => (
140-
<ExpandableSection toggleContent={customToggleContent} isExpanded={isExpanded} onToggle={() => {}}>
140+
<ExpandableSection toggleContent={customToggleContent} isExpanded={true} onToggle={() => {}}>
141141
This content is visible only when the component is expanded.
142142
</ExpandableSection>
143143
)
@@ -150,7 +150,7 @@ figma.connect(
150150
{
151151
variant: { State: 'Expanded Custom with Component swap' },
152152
example: () => (
153-
<ExpandableSection toggleContent={customToggleContent} isExpanded={isExpanded} onToggle={() => {}}>
153+
<ExpandableSection toggleContent={customToggleContent} isExpanded={true} onToggle={() => {}}>
154154
This content is visible only when the component is expanded.
155155
</ExpandableSection>
156156
)

packages/code-connect/components/ExpandableSection/ExpandableSectionDisclosure.figma.tsx

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@ figma.connect(
1616
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=2810-80',
1717
{
1818
props: {
19-
toggleText: figma.string('Toggle Text More')
19+
toggleText: figma.string('Toggle Text More'),
20+
isExpanded: false
2021
},
2122
example: (props) => (
2223
<ExpandableSection
23-
isExpanded={isExpanded}
24+
isExpanded={props.isExpanded}
2425
onToggle={() => {}}
25-
toggleText={isExpanded ? 'Show less basic example content' : `${props.toggleText}`}
26+
toggleText={props.isExpanded ? 'Show less basic example content' : `${props.toggleText}`}
2627
>
2728
This content is visible only when the component is expanded.
2829
</ExpandableSection>
@@ -37,13 +38,14 @@ figma.connect(
3738
variant: { State: 'Expanded' },
3839
props: {
3940
toggleText: figma.string('Toggle Text Less'),
40-
expandedContentSectionText: figma.string('Expanded Text')
41+
expandedContentSectionText: figma.string('Expanded Text'),
42+
isExpanded: true
4143
},
4244
example: (props) => (
4345
<ExpandableSection
44-
isExpanded={isExpanded}
46+
isExpanded={props.isExpanded}
4547
onToggle={() => {}}
46-
toggleText={isExpanded ? `${props.toggleText}` : 'Show more basic example content'}
48+
toggleText={props.isExpanded ? `${props.toggleText}` : 'Show more basic example content'}
4749
>
4850
{props.expandedContentSectionText}
4951
</ExpandableSection>
@@ -58,13 +60,14 @@ figma.connect(
5860
variant: { State: 'Expand Uncontrolled' },
5961
props: {
6062
toggleText: figma.string('Toggle Text More'),
61-
expandedContentSectionText: figma.string('Expanded Text')
63+
expandedContentSectionText: figma.string('Expanded Text'),
64+
isExpanded: true
6265
},
6366
example: (props) => (
6467
<ExpandableSection
65-
isExpanded={isExpanded}
68+
isExpanded={props.isExpanded}
6669
onToggle={() => {}}
67-
toggleText={isExpanded ? `${props.toggleText}` : 'Show less basic example content'}
70+
toggleText={props.isExpanded ? `${props.toggleText}` : 'Show less basic example content'}
6871
>
6972
{props.expandedContentSectionText}
7073
</ExpandableSection>
@@ -78,14 +81,15 @@ figma.connect(
7881
{
7982
variant: { State: 'Expanded Indent' },
8083
props: {
84+
expandedContentSectionText: figma.string('Expanded Text'),
8185
toggleText: figma.string('Toggle Text More'),
82-
expandedContentSectionText: figma.string('Expanded Text')
86+
isExpanded: true
8387
},
8488
example: (props) => (
8589
<ExpandableSection
86-
isExpanded={isExpanded}
90+
isExpanded={props.isExpanded}
8791
onToggle={() => {}}
88-
toggleText={isExpanded ? `${props.toggleText}` : 'Show less basic example content'}
92+
toggleText={props.isExpanded ? `${props.toggleText}` : 'Show less basic example content'}
8993
>
9094
{props.expandedContentSectionText}
9195
</ExpandableSection>
@@ -113,13 +117,14 @@ figma.connect(
113117
variant: { State: 'Expanded Custom Content' },
114118
props: {
115119
toggleText: figma.string('Toggle Text More'),
116-
expandedContentSectionText: figma.string('Expanded Text')
120+
expandedContentSectionText: figma.string('Expanded Text'),
121+
isExpanded: true
117122
},
118123
example: (props) => (
119124
<ExpandableSection
120-
isExpanded={isExpanded}
125+
isExpanded={props.isExpanded}
121126
onToggle={() => {}}
122-
toggleText={isExpanded ? `${props.toggleText}` : 'Show less basic example content'}
127+
toggleText={props.isExpanded ? `${props.toggleText}` : 'Show less basic example content'}
123128
>
124129
{props.expandedContentSectionText}
125130
</ExpandableSection>

0 commit comments

Comments
 (0)