Skip to content

Commit f3d81f7

Browse files
committed
chore: loading code moved to common util
1 parent 6e3c10e commit f3d81f7

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import { SelectPickerOptionType, SelectPickerProps, SelectPickerVariantType } fr
3333
import FormFieldWrapper from '../FormFieldWrapper/FormFieldWrapper'
3434
import { getFormFieldAriaAttributes } from '../FormFieldWrapper'
3535
import {
36+
renderLoadingMessage,
3637
SelectPickerClearIndicator,
3738
SelectPickerControl,
3839
SelectPickerDropdownIndicator,
@@ -180,6 +181,7 @@ import { GenericSectionErrorState } from '../GenericSectionErrorState'
180181
* />
181182
* ```
182183
*/
184+
183185
const SelectPicker = <OptionValue, IsMulti extends boolean>({
184186
error,
185187
icon,
@@ -332,8 +334,6 @@ const SelectPicker = <OptionValue, IsMulti extends boolean>({
332334
return null
333335
}
334336

335-
const renderLoadingMessage = () => <p className="m-0 cn-7 fs-13 fw-4 lh-20 py-6 px-8 dc__loading-dots">Loading</p>
336-
337337
const renderDisabledTippy = (children: ReactElement) => (
338338
<Tippy content={disabledTippyContent} placement="top" className="default-tt" arrow={false}>
339339
{children}

src/Shared/Components/SelectPicker/common.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,3 +425,7 @@ export const SelectPickerGroupHeading = <OptionValue,>({
425425
</components.GroupHeading>
426426
)
427427
}
428+
429+
export const renderLoadingMessage = () => (
430+
<p className="m-0 cn-7 fs-13 fw-4 lh-20 py-6 px-8 dc__loading-dots">Loading</p>
431+
)

0 commit comments

Comments
 (0)