UNPKG

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

32 lines (31 loc) 1.18 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TableElement = void 0; var _styledComponents = _interopRequireDefault(require("styled-components")); var _templateObject; 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 appliesDensity = function appliesDensity(param) { switch (param) { case "low": return { padding: "var(--spacing-scale-base)" }; case "high": return { padding: "var(--spacing-scale-2x)" }; default: return { padding: "var(--spacing-scale-baseh)" }; } }; var TableElement = _styledComponents.default.table(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n td,\n th {\n ", ";\n ", "\n }\n"])), function (props) { return props.border && "border: 1px solid var(--gray-20)"; }, function (props) { return props.density && appliesDensity(props.density); }); exports.TableElement = TableElement;