@ithinkdt/core
Version:
iThinkDT Core
65 lines (47 loc) • 1.21 kB
JavaScript
import { CssRender } from 'css-render';
import bem from '@css-render/plugin-bem';
const cssr = CssRender();
const CSS_MOUNT_ANCHOR_META_NAME = 'dt-frame-style';
const CSS_STYLE_PREFIX = 'dt';
const bemPlugin = bem({ blockPrefix: `.${CSS_STYLE_PREFIX}-` });
cssr.use(bemPlugin);
const { c, find, context } = cssr;
const { cB, cE, cM } = bemPlugin;
const fullWidth = {
width: '100%',
};
const fullHeight = {
height: '100%',
};
const fullWH = {
...fullWidth,
...fullHeight,
};
const flex = {
display: 'flex',
};
const flexDirCol = {
...flex,
flexDirection: 'column',
};
const flexAlignCenter = {
...flex,
alignItems: 'center',
};
const flexJustifyCenter = {
...flex,
justifyContent: 'center',
};
const flexJustifySB = {
...flex,
justifyContent: 'space-between',
};
const flexCenter = {
...flexAlignCenter,
...flexJustifyCenter,
};
const flexGap = (gap) => {
return { ...flex, gap }
};
export { CSS_MOUNT_ANCHOR_META_NAME, CSS_STYLE_PREFIX, c, cB, cE, cM, context, cssr, find, flex, flexAlignCenter, flexCenter, flexDirCol, flexGap, flexJustifyCenter, flexJustifySB, fullHeight, fullWH, fullWidth };
//# sourceMappingURL=cssr.js.map