UNPKG

@aegov/design-system-react

Version:

A design system for the Government of the United Arab Emirates. Extending the original design system released as @aegov/design-system, this is the package specefically created for the ReactJs enviornment.

74 lines (73 loc) 2.25 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.Soft = exports.SecondaryWithIcon = exports.Secondary = exports.ExternalLink = exports.Default = exports.CustomComponent = exports.CTA = void 0; var _react = _interopRequireDefault(require("react")); var _Hyperlink = require("./Hyperlink"); var _Button = require("../Button/Button"); function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } var _default = exports.default = { title: 'Components/Hyperlink', component: _Hyperlink.Hyperlink, args: { children: 'Hyperlink', href: 'https://example.com' }, argTypes: { variant: { control: 'select', options: ['default', 'cta', 'soft', 'secondary', 'secondary-soft'] } } }; const Default = exports.Default = { args: { children: 'Default Hyperlink' } }; const CTA = exports.CTA = { args: { children: 'Call to Action Link', variant: 'cta', icon: true } }; const Soft = exports.Soft = { args: { children: 'Soft Interaction Link', variant: 'soft' } }; const Secondary = exports.Secondary = { args: { children: 'Secondary Link', variant: 'secondary' } }; const SecondaryWithIcon = exports.SecondaryWithIcon = { args: { children: 'Secondary Link with Icon', variant: 'secondary', icon: true } }; const ExternalLink = exports.ExternalLink = { args: { children: 'External Link', external: true, href: 'https://example.com' } }; const CustomButtonComponent = /*#__PURE__*/_react.default.forwardRef((props, ref) => /*#__PURE__*/_react.default.createElement("button", _extends({ ref: ref, type: "button" }, props))); CustomButtonComponent.displayName = 'CustomButtonComponent'; const CustomComponent = exports.CustomComponent = { args: { asChild: true, children: /*#__PURE__*/_react.default.createElement(CustomButtonComponent, null, "Custom Button Component") } };