|
1 | 1 | import { |
2 | 2 | Box, |
| 3 | + DataList, |
3 | 4 | FlexBox, |
4 | 5 | FormGroup, |
5 | | - SelectDropdown, |
6 | 6 | Input, |
7 | | - DataList, |
| 7 | + SelectDropdown, |
8 | 8 | } from '@codecademy/gamut'; |
9 | 9 | import { RadarIcon, ResponsiveIcon, RocketIcon } from '@codecademy/gamut-icons'; |
10 | 10 | import type { Meta, StoryObj } from '@storybook/react'; |
@@ -209,80 +209,15 @@ export const DisabledOptions: Story = { |
209 | 209 | ], |
210 | 210 | }, |
211 | 211 | render: (args) => ( |
212 | | - // <Box height="15rem"> |
213 | | - // <FormGroup |
214 | | - // htmlFor="disabled-dropdown" |
215 | | - // isSoloField |
216 | | - // label="I might have disabled options" |
217 | | - // > |
218 | | - // <SelectDropdown {...args} /> |
219 | | - // </FormGroup> |
220 | | - // </Box> |
221 | | - |
222 | | - <FlexBox |
223 | | - width="65%" |
224 | | - column |
225 | | - data-testid="org-scope-org-sprecific-outer-container" |
226 | | - > |
227 | | - <FlexBox gap={16} data-testid="search-container"> |
228 | | - <FormGroup |
229 | | - data-testid="search-dropDown-form-group" |
230 | | - htmlFor="orgScopeSearch" |
231 | | - isSoloField |
232 | | - label="just testing" |
233 | | - > |
234 | | - <SelectDropdown |
235 | | - data-testid="search-dropDown" |
236 | | - htmlFor="orgScopeSearch-select" |
237 | | - name="orgScopeSearchDrpDwn" |
238 | | - options={args.options} |
239 | | - zIndex={5} |
240 | | - /> |
241 | | - </FormGroup> |
242 | | - <FormGroup |
243 | | - htmlFor="orgScopeSearchInput" |
244 | | - isSoloField |
245 | | - label=" " |
246 | | - data-testid="search-input-form-group" |
247 | | - > |
248 | | - <Input |
249 | | - data-testid="search-input" |
250 | | - htmlFor="orgScopeSearch-input" |
251 | | - name="orgScopeSearchInput" |
252 | | - placeholder="Search by domain or UUID" |
253 | | - size="base" |
254 | | - type="text" |
255 | | - // value={orgScopeSearchInput} |
256 | | - // onChange={handleInputChange} |
257 | | - // icon={SearchIcon} |
258 | | - /> |
259 | | - </FormGroup> |
260 | | - </FlexBox> |
261 | | - <DataList |
262 | | - id="crew" |
263 | | - idKey="name" |
264 | | - rows={[ |
265 | | - { |
266 | | - name: 'Jean Luc Picard', |
267 | | - role: 'Captain', |
268 | | - }, |
269 | | - { |
270 | | - name: 'Wesley Crusher', |
271 | | - role: 'Deus Ex Machina', |
272 | | - }, |
273 | | - ]} |
274 | | - columns={[ |
275 | | - { |
276 | | - header: 'Name', |
277 | | - key: 'name', |
278 | | - size: 'lg', |
279 | | - type: 'header', |
280 | | - sortable: true, |
281 | | - }, |
282 | | - { header: 'Rank', key: 'role', size: 'lg', sortable: true }, |
283 | | - ]} |
284 | | - /> |
285 | | - </FlexBox> |
| 212 | + <Box height="15rem"> |
| 213 | + <FormGroup |
| 214 | + htmlFor="disabled-dropdown" |
| 215 | + isSoloField |
| 216 | + label="I might have disabled options" |
| 217 | + > |
| 218 | + <SelectDropdown {...args} /> |
| 219 | + </FormGroup> |
| 220 | + </Box> |
286 | 221 | ), |
287 | 222 | }; |
288 | 223 |
|
@@ -1067,3 +1002,69 @@ export const LongPlaceholderAgain: Story = { |
1067 | 1002 | </Box> |
1068 | 1003 | ), |
1069 | 1004 | }; |
| 1005 | + |
| 1006 | +export const TemporaryZIndexExample: Story = { |
| 1007 | + render: (args) => ( |
| 1008 | + <FlexBox |
| 1009 | + column |
| 1010 | + data-testid="org-scope-org-sprecific-outer-container" |
| 1011 | + width="65%" |
| 1012 | + > |
| 1013 | + <FlexBox data-testid="search-container" gap={16}> |
| 1014 | + <FormGroup |
| 1015 | + data-testid="search-dropDown-form-group" |
| 1016 | + htmlFor="orgScopeSearch" |
| 1017 | + isSoloField |
| 1018 | + label="just testing, will delete after PR approval" |
| 1019 | + > |
| 1020 | + <SelectDropdown |
| 1021 | + data-testid="search-dropDown" |
| 1022 | + htmlFor="orgScopeSearch-select" |
| 1023 | + name="orgScopeSearchDrpDwn" |
| 1024 | + options={args.options} |
| 1025 | + placeholder="Has no zIndex arg, uses default" |
| 1026 | + /> |
| 1027 | + </FormGroup> |
| 1028 | + <FormGroup |
| 1029 | + data-testid="search-input-form-group" |
| 1030 | + htmlFor="orgScopeSearchInput" |
| 1031 | + isSoloField |
| 1032 | + label=" " |
| 1033 | + > |
| 1034 | + <SelectDropdown |
| 1035 | + data-testid="search-dropDown" |
| 1036 | + htmlFor="orgScopeSearch-select" |
| 1037 | + name="orgScopeSearchDrpDwn" |
| 1038 | + options={args.options} |
| 1039 | + placeholder="has a zIndex of 5" |
| 1040 | + zIndex={5} |
| 1041 | + /> |
| 1042 | + </FormGroup> |
| 1043 | + </FlexBox> |
| 1044 | + <DataList |
| 1045 | + columns={[ |
| 1046 | + { |
| 1047 | + header: 'Name', |
| 1048 | + key: 'name', |
| 1049 | + size: 'lg', |
| 1050 | + type: 'header', |
| 1051 | + sortable: true, |
| 1052 | + }, |
| 1053 | + { header: 'Rank', key: 'role', size: 'lg', sortable: true }, |
| 1054 | + ]} |
| 1055 | + id="crew" |
| 1056 | + idKey="name" |
| 1057 | + rows={[ |
| 1058 | + { |
| 1059 | + name: 'Jean Luc Picard', |
| 1060 | + role: 'Captain', |
| 1061 | + }, |
| 1062 | + { |
| 1063 | + name: 'Wesley Crusher', |
| 1064 | + role: 'Deus Ex Machina', |
| 1065 | + }, |
| 1066 | + ]} |
| 1067 | + /> |
| 1068 | + </FlexBox> |
| 1069 | + ), |
| 1070 | +}; |
0 commit comments