colibri-ui 0.5.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Button/index.js CHANGED
@@ -1 +1,40 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),r=require("@emotion/react/jsx-runtime"),i=require("react"),n=require("./styles.js"),t=i.forwardRef((function(i,t){var c=i.className,l=i.fullWidth,o=void 0!==l&&l,s=i.variant,a=void 0===s?"primary":s,d=i.iconStart,u=i.iconEnd,f=i.icon,h=i.children,v=i.onClick,j=e.__rest(i,["className","fullWidth","variant","iconStart","iconEnd","icon","children","onClick"]);return r.jsxs(n.StyledButton,e.__assign({onClick:v,ref:t,className:c,variant:a,icon:f,fullWidth:o},j,{children:[f&&r.jsx(n.StyledIcon,{children:f}),d&&r.jsx(n.StyledIcon,{children:d}),h&&h,u&&r.jsx(n.StyledIcon,{children:u})]}))}));exports.default=t;
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var tslib = require('tslib');
6
+ var jsxRuntime = require('@emotion/react/jsx-runtime');
7
+ var react = require('react');
8
+ var styles = require('./styles.js');
9
+
10
+ var Button = /*#__PURE__*/react.forwardRef(function (_a, ref) {
11
+ var className = _a.className,
12
+ _b = _a.fullWidth,
13
+ fullWidth = _b === void 0 ? false : _b,
14
+ _c = _a.variant,
15
+ variant = _c === void 0 ? "primary" : _c,
16
+ iconStart = _a.iconStart,
17
+ iconEnd = _a.iconEnd,
18
+ icon = _a.icon,
19
+ children = _a.children,
20
+ onClick = _a.onClick,
21
+ props = tslib.__rest(_a, ["className", "fullWidth", "variant", "iconStart", "iconEnd", "icon", "children", "onClick"]);
22
+ return jsxRuntime.jsxs(styles.StyledButton, tslib.__assign({
23
+ onClick: onClick,
24
+ ref: ref,
25
+ className: className,
26
+ variant: variant,
27
+ icon: icon,
28
+ fullWidth: fullWidth
29
+ }, props, {
30
+ children: [icon && jsxRuntime.jsx(styles.StyledIcon, {
31
+ children: icon
32
+ }), iconStart && jsxRuntime.jsx(styles.StyledIcon, {
33
+ children: iconStart
34
+ }), children && children, iconEnd && jsxRuntime.jsx(styles.StyledIcon, {
35
+ children: iconEnd
36
+ })]
37
+ }));
38
+ });
39
+
40
+ exports.default = Button;