Skip to content

Commit 77c0c6b

Browse files
committed
feat: add documentation comments
1 parent 52eeb19 commit 77c0c6b

File tree

2 files changed

+46
-1
lines changed

2 files changed

+46
-1
lines changed

src/Shared/Components/SelectPicker/SelectPicker.component.tsx

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,52 @@ import { SelectPickerOptionType, SelectPickerProps, SelectPickerVariantType } fr
126126
* ```tsx
127127
* <SelectPicker ... showSelectedOptionsCount />
128128
* ```
129+
* @example Multi Select
130+
* ```tsx
131+
* <SelectPicker ... isMulti />
132+
* ```
133+
*
134+
* @example Creatable Multi Select
135+
* ```tsx
136+
* <SelectPicker
137+
* ...
138+
* isMulti
139+
* multiSelectProps={{
140+
* isCreatable: true
141+
* }}
142+
* />
143+
* ```
144+
*
145+
* @example Multi Select with group heading selectable
146+
* ```tsx
147+
* <SelectPicker
148+
* ...
149+
* isMulti
150+
* multiSelectProps={{
151+
* isGroupHeadingSelectable: true
152+
* }}
153+
* />
154+
* ```
155+
*
156+
* @example Multi Select with selected option validator
157+
* ```tsx
158+
* <SelectPicker
159+
* ...
160+
* isMulti
161+
* multiSelectProps={{
162+
* getIsOptionValid: (option) => boolean
163+
* }}
164+
* />
165+
* ```
166+
*
167+
* @example Custom options rendering support (menuIsOpen needs to be handled by consumer)
168+
* ```tsx
169+
* <SelectPicker
170+
* ...
171+
* shouldRenderCustomOptions
172+
* renderCustomOptions={() => <div />}
173+
* />
174+
* ```
129175
*/
130176
const SelectPicker = forwardRef(
131177
(

src/Shared/Components/SelectPicker/type.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ export type SelectPickerProps = Pick<
131131
* @default false
132132
*/
133133
disableDescriptionEllipsis?: boolean
134-
// TODO: ref support?
135134
} & (
136135
| {
137136
isMulti?: never

0 commit comments

Comments
 (0)