UNPKG

stylex-webpack

Version:

The another Webpack Plugin for Facebook's StyleX

39 lines (36 loc) 1.11 kB
import { ClassValue } from 'clsx'; import { StaticStyles } from '@stylexjs/stylex'; declare function stylexPropsWithClassName(stylexProps: Readonly<{ className?: string; 'data-style-src'?: string; style?: Readonly<{ [$$Key$$: string]: string | number; }>; }>, ...inputs: ClassValue[]): { className: string; 'data-style-src'?: string; style?: Readonly<{ [$$Key$$: string]: string | number; }>; }; declare function stylexPropsWithStyleObject(stylexProps: Readonly<{ className?: string; 'data-style-src'?: string; style?: Readonly<{ [$$Key$$: string]: string | number; }>; }>, style: Readonly<{ [$$Key$$: string]: string | number; }>): { style: { [x: string]: string | number; }; className?: string; 'data-style-src'?: string; }; type WithXStyleProps<T = object, X extends StaticStyles = StaticStyles> = Omit<T, 'className' | 'style'> & { xstyle?: X; }; declare const DEFAULT_XSTYLE: StaticStyles; export { DEFAULT_XSTYLE, stylexPropsWithClassName, stylexPropsWithStyleObject }; export type { WithXStyleProps };