styled-components
Version:
CSS for the <Component> Age. Style components your way with speed, strong typing, and flexibility.
7 lines (6 loc) • 474 B
TypeScript
import React from 'react';
import { AnyComponent, ExecutionProps } from '../types';
import { NonReactStatics } from '../utils/hoist';
type WithThemeOuterProps<T extends AnyComponent> = Omit<React.ComponentPropsWithRef<T>, keyof ExecutionProps> & ExecutionProps;
export default function withTheme<T extends AnyComponent>(Component: T): React.ForwardRefExoticComponent<React.PropsWithoutRef<WithThemeOuterProps<T>> & React.RefAttributes<any>> & NonReactStatics<T>;
export {};