From 9ff836dc25dfbcd21e8bf7f690e57aae2886ca85 Mon Sep 17 00:00:00 2001 From: dead8309 Date: Sat, 12 Oct 2024 00:18:18 +0530 Subject: [PATCH] refactor(helpText): replace Dropdown with Select component in story of HelpText - Closes #2381 --- .../helpText/__stories__/index.story.jsx | 95 ++++++++++++++++++- 1 file changed, 93 insertions(+), 2 deletions(-) diff --git a/core/components/atoms/helpText/__stories__/index.story.jsx b/core/components/atoms/helpText/__stories__/index.story.jsx index 2d311adaed..b781dea8df 100644 --- a/core/components/atoms/helpText/__stories__/index.story.jsx +++ b/core/components/atoms/helpText/__stories__/index.story.jsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { HelpText, Label, Dropdown } from '@/index'; +import { HelpText, Label, Select } from '@/index'; // CSF format story export const all = () => { @@ -50,14 +50,105 @@ export const all = () => { <>
- +
); }; +const customCode = `() => { + const options = [ + { + label: 'Alabama (205)', + value: 'Alabama (205)', + }, + { + label: 'Alabama (251)', + value: 'Alabama (251)', + }, + { + label: 'Alabama (256)', + value: 'Alabama (256)', + }, + { + label: 'Alabama (334)', + value: 'Alabama (334)', + }, + { + label: 'Alabama (938)', + value: 'Alabama (938)', + }, + { + label: 'Arizona (520)', + value: 'Arizona (520)', + }, + { + label: 'California (209)', + value: 'California (209)', + }, + { + label: 'California (408)', + value: 'California (408)', + }, + { + label: 'Colorado (719)', + value: 'Colorado (719)', + }, + { + label: 'Connecticut (860)', + value: 'Connecticut (860)', + }, + ]; + + return ( + <> + +
+ + +
+ + ); +}`; + export default { title: 'Components/HelpText/All', component: HelpText, + parameters: { + docs: { + docPage: { + title: 'HelpText', + customCode, + }, + }, + }, };