@smart-react-components/ui
Version:
SRC UI includes React and Styled components.
31 lines (29 loc) • 863 B
JavaScript
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const Div_1 = __importDefault(require("@smart-react-components/core/Element/Div"));
const styled_components_1 = __importDefault(require("styled-components"));
exports.default = (0, styled_components_1.default)(Div_1.default).attrs(({ hasSpace }) => ({
getButtonSize: (v, t) => `
${hasSpace
? `
margin: -${t.$.size.button[v].margin.y} -${t.$.size.button[v].margin.x};
`
: ''}
`,
}))(({ isBlock, length }) => `
align-items: center;
display: flex;
${isBlock
? `
> * {
flex: 1 1 ${100 / length}%;
width: ${100 / length}%;
}
`
: `
flex-wrap: wrap;
`}
`);
;