@enact/ui
Version:
A collection of simplified unstyled cross-platform UI components for Enact
36 lines (30 loc) • 1.1 kB
TypeScript
// Type definitions for ui/RadioDecorator
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
type Merge<M, N> = Omit<M, Extract<keyof M, keyof N>> & N;
export interface RadioControllerDecoratorProps {}
export function RadioControllerDecorator<P>(
Component: React.ComponentType<P> | string,
): React.ComponentType<P & RadioControllerDecoratorProps>;
export interface RadioDecoratorConfig extends Object {
/**
* The event indicating the wrapped component is activated
*/
activate?: string;
/**
* The event indicating the wrapped component is deactivated
*/
deactivate?: string;
/**
* The name of a boolean prop that activates the wrapped component when it is true.
*/
prop?: string;
}
export interface RadioDecoratorProps {}
export function RadioDecorator<P>(
config: RadioDecoratorConfig,
Component: React.ComponentType<P> | string,
): React.ComponentType<P & RadioDecoratorProps>;
export function RadioDecorator<P>(
Component: React.ComponentType<P> | string,
): React.ComponentType<P & RadioDecoratorProps>;
export default RadioDecorator;