UNPKG

merge-sx

Version:

Combines multiple SxProps for Material UI components.

17 lines (14 loc) 663 B
import { SxProps } from '@mui/system'; /** * @desc Combines multiple SxProps * @author Anna Bocharova * @link https://stackoverflow.com/a/71533846 * @link https://mui.com/system/getting-started/the-sx-prop/#array-values * @link https://mui.com/system/getting-started/the-sx-prop/#passing-the-sx-prop * @requires SxProps from MUI 5.1.0 or higher * @see https://github.com/mui/material-ui/releases/tag/v5.1.0 * @link https://github.com/mui/material-ui/pull/29297 * @since v0.1.4 using for..of instead of reducer for performance reasons */ declare const mergeSx: <T extends object>(...styles: (SxProps<T> | false | undefined)[]) => SxProps<T>; export { mergeSx };