design-system-govbr-rnp
Version:
## Padrão Digital de Governo - React Biblioteca de componentes React que implementa o [Padrão Visual digital do governo](https://www.gov.br/ds/). O objetivo da biblioteca é facilitar a implementação e promover a padronização das interfaces de sistemas do
68 lines (67 loc) • 2.08 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.Row = exports.ComponentContainer = void 0;
var _styledComponents = _interopRequireDefault(require("styled-components"));
var _templateObject, _templateObject2;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
var handleFillGrowShrink = function handleFillGrowShrink(param) {
switch (param) {
case "flex-grow-1":
return {
flexGrow: "1"
};
case "flex-grow-0":
return {
flexGrow: "0"
};
case "flex-shrink-1":
return {
flexShrink: "1"
};
case "flex-shrink-0":
return {
flexShrink: "0"
};
default:
return {
flex: "1 1 auto"
};
}
};
var Row = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n ", "\n ", "\n"])), function (props) {
return props.alignSelf && {
alignSelf: props.alignSelf
};
}, function (props) {
return props.fillGrowShrink && handleFillGrowShrink(props.fillGrowShrink);
}, function (props) {
return props.order && {
order: props.order
};
});
exports.Row = Row;
var ComponentContainer = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n ", "\n ", "\n ", "\n ", "\n ", "\n"])), function (props) {
return props.direction && {
flexDirection: props.direction
};
}, function (props) {
return props.justifyContent && {
justifyContent: props.justifyContent
};
}, function (props) {
return props.alignItems && {
alignItems: props.alignItems
};
}, function (props) {
return props.wrap && {
flexWrap: props.wrap
};
}, function (props) {
return props.alignContent && {
alignContent: props.alignContent
};
});
exports.ComponentContainer = ComponentContainer;