react-basic-elements
Version:
A lightweight collection of basic React layout and UI primitives with built-in style support.
32 lines (31 loc) • 659 B
TypeScript
export type ShorthandSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
export type Size = ShorthandSize | number | string;
export interface SizeProps {
w?: string | number;
h?: string | number;
minW?: string | number;
maxW?: string | number;
minH?: string | number;
maxH?: string | number;
fz?: Size;
radius?: Size;
}
export interface SpacingProps {
m?: Size;
mt?: Size;
mb?: Size;
ml?: Size;
mr?: Size;
mx?: Size;
my?: Size;
p?: Size;
pt?: Size;
pb?: Size;
pl?: Size;
pr?: Size;
px?: Size;
py?: Size;
}
export type CommonStyles = SizeProps & SpacingProps & {
bg?: string;
};