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

78 lines (77 loc) 2.2 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.Text = exports.SmallDensity = exports.MediumDensity = exports.LargeDensity = exports.IconButton = void 0; var _react = _interopRequireDefault(require("react")); var _freeSolidSvgIcons = require("@fortawesome/free-solid-svg-icons"); var _MagicButton = _interopRequireDefault(require("./MagicButton")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var _default = { title: "Components/MagicButton", component: _MagicButton.default, argTypes: { density: { description: "Densidade do elemento, podendo ser: small, medium ou large." }, label: { description: "Texto informativo do botão, o mesmo será usado como aria-label caso o botão seja um icon button." }, onClick: { description: "Função de callback ao clicar no botão." } } }; exports.default = _default; var Template = function Template(args) { return /*#__PURE__*/_react.default.createElement(_MagicButton.default, args); }; var Text = Template.bind({}); exports.Text = Text; Text.storyName = "Texto"; Text.args = { label: "Label", onClick: function onClick() { return null; } }; var SmallDensity = Template.bind({}); exports.SmallDensity = SmallDensity; SmallDensity.storyName = "Densidade - Baixa"; SmallDensity.args = { density: "small", label: "Label", onClick: function onClick() { return null; } }; var MediumDensity = Template.bind({}); exports.MediumDensity = MediumDensity; MediumDensity.storyName = "Densidade - Média"; MediumDensity.args = { density: "medium", label: "Label", onClick: function onClick() { return null; } }; var LargeDensity = Template.bind({}); exports.LargeDensity = LargeDensity; LargeDensity.storyName = "Densidade - Alta"; LargeDensity.args = { density: "large", label: "Label", onClick: function onClick() { return null; } }; var IconButton = Template.bind({}); exports.IconButton = IconButton; IconButton.storyName = "Icone"; IconButton.args = { label: "Label", icon: _freeSolidSvgIcons.faGlobe, onClick: function onClick() { return null; } };