Skip to content

Commit 6b4b1b1

Browse files
committed
move placeholder to jsdoc
1 parent 2ce97dd commit 6b4b1b1

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

packages/gamut/src/Form/SelectDropdown/types.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ export interface ExtendedOption extends IconOption {
5959
abbreviation?: string;
6060
}
6161

62-
6362
/**
6463
* Group structure for organizing options into categories.
6564
* Extends react-select's GroupBase with optional divider support.
@@ -157,7 +156,10 @@ export interface SelectDropdownCoreProps
157156
SharedProps {
158157
/** Required name attribute for the select input */
159158
name: string;
160-
/** Placeholder text shown when no option is selected */
159+
/** Placeholder text shown when no option is selected.
160+
* Placeholder text is not recommended for accessibility. If you need to use placeholder text,
161+
* please make sure the placeholder text doesn't add any new information to the input.
162+
* I.e - if the placeholder text describes an action you'd like the user to take, please use a label instead. */
161163
placeholder?: string;
162164
/** Array of options or option groups to display in the dropdown */
163165
options?: SelectDropdownOptions | SelectDropdownGroup[];

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,6 @@ The independent width feature works particularly well with the small size varian
193193
<Canvas of={SelectDropdownStories.FormGroupSelectDropdown} />
194194
<Canvas of={SelectDropdownStories.FormGroupError} />
195195

196-
### Placeholder text guidance
197-
198-
Placeholder text is not recommended for accessibility. If you need to use placeholder text, please make sure the placeholder text doesn't add any new information to the input. I.e - if the placeholder text describes an action you'd like the user to take, please use a label instead.
199-
200196
## Playground
201197

202198
<Canvas sourceState="shown" of={SelectDropdownStories.Default} />

0 commit comments

Comments
 (0)