You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: packages/@react-spectrum/s2/stories/ComboBox.stories.tsx
+21-68
Original file line number
Diff line number
Diff line change
@@ -134,7 +134,26 @@ Validation.args = {
134
134
135
135
exportconstContextualHelpExample: Story={
136
136
render: (args)=>(
137
-
<ComboBox{...args}>
137
+
<ComboBox
138
+
{...args}
139
+
contextualHelp={
140
+
<ContextualHelp>
141
+
<Heading>What is a ice cream?</Heading>
142
+
<Content>
143
+
<Text>
144
+
A combination of sugar, eggs, milk, and cream is cooked to make
145
+
a custard base. Then, flavorings are added, and this flavored
146
+
mixture is carefully churned and frozen to make ice cream.
147
+
</Text>
148
+
</Content>
149
+
<Footer>
150
+
<Link
151
+
isStandalone
152
+
href="https://en.wikipedia.org/wiki/Ice_cream"
153
+
target="_blank">Learn more about ice cream</Link>
154
+
</Footer>
155
+
</ContextualHelp>
156
+
}>
138
157
<ComboBoxItem>Chocolate</ComboBoxItem>
139
158
<ComboBoxItem>Mint</ComboBoxItem>
140
159
<ComboBoxItem>Strawberry</ComboBoxItem>
@@ -143,73 +162,7 @@ export const ContextualHelpExample: Story = {
143
162
</ComboBox>
144
163
),
145
164
args: {
146
-
label: 'Ice cream flavor',
147
-
contextualHelp: (
148
-
<ContextualHelp>
149
-
<Heading>What is a ice cream?</Heading>
150
-
<Content>
151
-
<Text>
152
-
A combination of sugar, eggs, milk, and cream is cooked to make
153
-
a custard base. Then, flavorings are added, and this flavored
154
-
mixture is carefully churned and frozen to make ice cream.
155
-
</Text>
156
-
</Content>
157
-
<Footer>
158
-
<Link
159
-
isStandalone
160
-
href="https://en.wikipedia.org/wiki/Ice_cream"
161
-
target="_blank">Learn more about ice cream</Link>
162
-
</Footer>
163
-
</ContextualHelp>
164
-
)
165
-
}
166
-
};
167
-
168
-
ContextualHelpExample.parameters={
169
-
docs: {
170
-
source: {
171
-
transform: ()=>{
172
-
return`
173
-
<ComboBox
174
-
contextualHelp={
175
-
<ContextualHelp>
176
-
<Heading>
177
-
What is a ice cream?
178
-
</Heading>
179
-
<Content>
180
-
<Text>
181
-
A combination of sugar, eggs, milk, and cream is cooked to make a custard base. Then, flavorings are added, and this flavored mixture is carefully churned and frozen to make ice cream.
<Image slot="hero" src="https://i.imgur.com/Z7AzH2c.png" alt="Sky over roof" />
67
-
<Heading slot="title">Dialog title</Heading>
68
-
<Header>Header</Header>
69
-
<Content>
70
-
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in</p>
71
-
</Content>
72
-
<Footer><Checkbox>Don't show this again</Checkbox></Footer>
<Image slot="hero" src="https://i.imgur.com/Z7AzH2c.png" alt="Sky over roof" />
163
-
<Heading slot="title">Dialog title</Heading>
164
-
<Header>Header</Header>
165
-
<Content>
166
-
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in</p>
167
-
</Content>
168
-
<Footer><Checkbox>Don't show this again</Checkbox></Footer>
0 commit comments