UNPKG

837 BTypeScriptView Raw
1import { ComponentType } from 'react';
2import { PlaceholderProps } from '../components/Placeholder';
3import { Fade, collapseDuration } from './transitions';
4import { GroupTypeBase, OptionTypeBase } from '../types';
5
6export type AnimatedPlaceholderProps<
7 OptionType extends OptionTypeBase,
8 IsMulti extends boolean,
9 GroupType extends GroupTypeBase<OptionType> = GroupTypeBase<OptionType>
10> = PlaceholderProps<OptionType, IsMulti, GroupType>;
11
12export 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
20export default AnimatedPlaceholder;