reflexy
Version:
Flexbox layout react components
10 lines (9 loc) • 546 B
TypeScript
import type React from 'react';
import '@js-toolkit/utils/types';
import type { SpaceProps, FlexProps, SpaceSize } from './types';
export default function props2style({ basis, order, grow, shrink, hfill, vfill, mSize, mUnit, m, mb, ml, mr, mt, pSize, pUnit, p, pb, pl, pr, pt, }: FlexProps & Omit<SpaceProps, 'mSize' | 'mUnit' | 'pSize' | 'pUnit'> & {
mSize: number;
mUnit: NonNullable<SpaceProps['mUnit']>;
pSize: number;
pUnit: NonNullable<SpaceProps['pUnit']>;
}, defaultSizes: Record<SpaceSize, number>): React.CSSProperties;