@chakra-ui/styled-system
Version:
Style function for css-in-js building component libraries
39 lines (37 loc) • 699 B
JavaScript
import { createTransform } from "./create-transform";
export function toConfig(scale, transform) {
return property => {
var result = {
property,
scale
};
result.transform = createTransform({
scale,
transform
});
return result;
};
}
var getRtl = (_ref) => {
var {
rtl,
ltr
} = _ref;
return theme => theme.direction === "rtl" ? rtl : ltr;
};
export function logical(options) {
var {
property,
scale,
transform
} = options;
return {
scale,
property: getRtl(property),
transform: scale ? createTransform({
scale,
compose: transform
}) : transform
};
}
//# sourceMappingURL=prop-config.js.map