UNPKG

@chakra-v2/styled-system

Version:

Style function for css-in-js building component libraries

57 lines (54 loc) 1.88 kB
import { t } from '../utils/index.mjs'; const space = { margin: t.spaceT("margin"), marginTop: t.spaceT("marginTop"), marginBlockStart: t.spaceT("marginBlockStart"), marginRight: t.spaceT("marginRight"), marginInlineEnd: t.spaceT("marginInlineEnd"), marginBottom: t.spaceT("marginBottom"), marginBlockEnd: t.spaceT("marginBlockEnd"), marginLeft: t.spaceT("marginLeft"), marginInlineStart: t.spaceT("marginInlineStart"), marginX: t.spaceT(["marginInlineStart", "marginInlineEnd"]), marginInline: t.spaceT("marginInline"), marginY: t.spaceT(["marginTop", "marginBottom"]), marginBlock: t.spaceT("marginBlock"), padding: t.space("padding"), paddingTop: t.space("paddingTop"), paddingBlockStart: t.space("paddingBlockStart"), paddingRight: t.space("paddingRight"), paddingBottom: t.space("paddingBottom"), paddingBlockEnd: t.space("paddingBlockEnd"), paddingLeft: t.space("paddingLeft"), paddingInlineStart: t.space("paddingInlineStart"), paddingInlineEnd: t.space("paddingInlineEnd"), paddingX: t.space(["paddingInlineStart", "paddingInlineEnd"]), paddingInline: t.space("paddingInline"), paddingY: t.space(["paddingTop", "paddingBottom"]), paddingBlock: t.space("paddingBlock") }; Object.assign(space, { m: space.margin, mt: space.marginTop, mr: space.marginRight, me: space.marginInlineEnd, marginEnd: space.marginInlineEnd, mb: space.marginBottom, ml: space.marginLeft, ms: space.marginInlineStart, marginStart: space.marginInlineStart, mx: space.marginX, my: space.marginY, p: space.padding, pt: space.paddingTop, py: space.paddingY, px: space.paddingX, pb: space.paddingBottom, pl: space.paddingLeft, ps: space.paddingInlineStart, paddingStart: space.paddingInlineStart, pr: space.paddingRight, pe: space.paddingInlineEnd, paddingEnd: space.paddingInlineEnd }); export { space };