Skip to content

Commit

Permalink
[MISC][RL] Update variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
qroll committed Nov 11, 2024
1 parent 3ce1669 commit 89056b8
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions stories/form/form-range-select/form-range-select.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const meta: Meta<Component> = {

export default meta;

const _selectOptions = {
const RANGE_OPTIONS = {
from: [
{ value: "A", label: "Option A" },
{ value: "B", label: "Option B" },
Expand Down Expand Up @@ -69,15 +69,15 @@ export const Default: StoryObj<Component> = {
/>
<Form.RangeSelect
label="This is the disabled state"
options={_selectOptions}
options={RANGE_OPTIONS}
valueExtractor={(item) => item.value}
listExtractor={(item) => item.label}
displayValueExtractor={(item) => item.label}
disabled
/>
<Form.RangeSelect
label="This is the disabled state with selected value"
options={_selectOptions}
options={RANGE_OPTIONS}
selectedOptions={{
from: {
value: "A",
Expand All @@ -95,7 +95,7 @@ export const Default: StoryObj<Component> = {
/>
<Form.RangeSelect
label="This is the readonly state"
options={_selectOptions}
options={RANGE_OPTIONS}
valueExtractor={(item) => item.value}
listExtractor={(item) => item.label}
displayValueExtractor={(item) => item.label}
Expand All @@ -107,7 +107,7 @@ export const Default: StoryObj<Component> = {
/>
<Form.RangeSelect
label="This is the error state"
options={_selectOptions}
options={RANGE_OPTIONS}
valueExtractor={(item) => item.value}
listExtractor={(item) => item.label}
displayValueExtractor={(item) => item.label}
Expand Down Expand Up @@ -197,7 +197,7 @@ export const WithSearch: StoryObj<Component> = {
<Container>
<Form.RangeSelect
label="This has searchable options"
options={_selectOptions}
options={RANGE_OPTIONS}
valueExtractor={(item) => item.value}
listExtractor={(item) => item.label}
displayValueExtractor={(item) => item.label}
Expand All @@ -215,15 +215,15 @@ export const RenderingInGridLayout: StoryObj<Component> = {
<Layout.Content type="grid" style={{ padding: "2rem" }}>
<Form.RangeSelect
label="A shorter form input"
options={_selectOptions}
options={RANGE_OPTIONS}
valueExtractor={(item) => item.value}
listExtractor={(item) => item.label}
displayValueExtractor={(item) => item.label}
mobileCols={[1, 5]}
/>
<Form.RangeSelect
label="A longer form input"
options={_selectOptions}
options={RANGE_OPTIONS}
valueExtractor={(item) => item.value}
listExtractor={(item) => item.label}
displayValueExtractor={(item) => item.label}
Expand All @@ -244,15 +244,15 @@ export const StandaloneUsage: StoryObj<StandaloneComponent> = {
<StoryContainer>
<Container>
<InputRangeSelect
options={_selectOptions}
options={RANGE_OPTIONS}
valueExtractor={(item) => item.value}
listExtractor={(item) => item.label}
displayValueExtractor={(item) => item.label}
placeholders={{ from: "DefaultFrom", to: "DefaultTo" }}
/>
<br />
<InputRangeSelect
options={_selectOptions}
options={RANGE_OPTIONS}
valueExtractor={(item) => item.value}
listExtractor={(item) => item.label}
displayValueExtractor={(item) => item.label}
Expand Down

0 comments on commit 89056b8

Please sign in to comment.