1 | import { ComponentType } from 'react';
|
2 | import { PlaceholderProps } from '../components/Placeholder';
|
3 | import { Fade, collapseDuration } from './transitions';
|
4 | import { GroupTypeBase, OptionTypeBase } from '../types';
|
5 |
|
6 | export type AnimatedPlaceholderProps<
|
7 | OptionType extends OptionTypeBase,
|
8 | IsMulti extends boolean,
|
9 | GroupType extends GroupTypeBase<OptionType> = GroupTypeBase<OptionType>
|
10 | > = PlaceholderProps<OptionType, IsMulti, GroupType>;
|
11 |
|
12 | export function AnimatedPlaceholder<
|
13 | OptionType extends OptionTypeBase,
|
14 | IsMulti extends boolean,
|
15 | GroupType extends GroupTypeBase<OptionType> = GroupTypeBase<OptionType>
|
16 | >(
|
17 | WrappedComponent: ComponentType<PlaceholderProps<OptionType, IsMulti, GroupType>>,
|
18 | ): ComponentType<AnimatedPlaceholderProps<OptionType, IsMulti, GroupType>>;
|
19 |
|
20 | export default AnimatedPlaceholder;
|