quantumai-design-system
Version:
퀀텀에이아이의 디자인 시스템
20 lines (19 loc) • 1.71 kB
JavaScript
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
return cooked;
};
import { css } from '@emotion/react';
import { mixinSize, mixinSpacing, numToPx } from '../../../utils/styleSet';
var flexEnum = function (value) {
var alignEnum = {
start: 'flex-start',
end: 'flex-end',
between: 'space-between',
around: 'space-around',
};
if (value && Object.keys(alignEnum).includes(value))
return alignEnum[value];
return value;
};
export var FlexStyle = function (props) { return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n box-sizing: border-box;\n justify-content: ", ";\n align-items: ", ";\n justify-self: ", ";\n align-self: ", ";\n gap: ", ";\n flex-direction: ", ";\n flex: ", ";\n flex-wrap: ", ";\n flex-basis: ", ";\n flex-grow: ", ";\n flex-shrink: ", ";\n background-color: ", ";\n ", "\n ", "\n"], ["\n display: flex;\n box-sizing: border-box;\n justify-content: ", ";\n align-items: ", ";\n justify-self: ", ";\n align-self: ", ";\n gap: ", ";\n flex-direction: ", ";\n flex: ", ";\n flex-wrap: ", ";\n flex-basis: ", ";\n flex-grow: ", ";\n flex-shrink: ", ";\n background-color: ", ";\n ", "\n ", "\n"])), flexEnum(props.justifyContent), flexEnum(props.alignItems), props.justifySelf, props.alignSelf, props.gap && numToPx(props.gap), props.direction, props.flex, props.flexWrap, props.flexBasis, props.flexGrow, props.flexShrink, props.bgColor, mixinSize(props), mixinSpacing(props)); };
var templateObject_1;