Skip to content

Commit bf26961

Browse files
committed
create new temporary story
1 parent f3bcb8b commit bf26961

File tree

2 files changed

+79
-76
lines changed

2 files changed

+79
-76
lines changed

packages/styleguide/src/lib/Atoms/FormInputs/SelectDropdown/SelectDropdown.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ export const parameters = {
2323

2424
<ComponentHeader {...parameters} />
2525

26+
<Canvas of={SelectDropdownStories.TemporaryZIndexExample} />
27+
2628
## Usage
2729

2830
Use SelectDropdown to pick from exclusive options within a styled dropdown.

packages/styleguide/src/lib/Atoms/FormInputs/SelectDropdown/SelectDropdown.stories.tsx

Lines changed: 77 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import {
22
Box,
3+
DataList,
34
FlexBox,
45
FormGroup,
5-
SelectDropdown,
66
Input,
7-
DataList,
7+
SelectDropdown,
88
} from '@codecademy/gamut';
99
import { RadarIcon, ResponsiveIcon, RocketIcon } from '@codecademy/gamut-icons';
1010
import type { Meta, StoryObj } from '@storybook/react';
@@ -209,80 +209,15 @@ export const DisabledOptions: Story = {
209209
],
210210
},
211211
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="&nbsp;"
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>
286221
),
287222
};
288223

@@ -1067,3 +1002,69 @@ export const LongPlaceholderAgain: Story = {
10671002
</Box>
10681003
),
10691004
};
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="&nbsp;"
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

Comments
 (0)