@trafilea/afrodita-components 7.1.15 → 7.1.16
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.
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__rest as i,__assign as e}from"tslib";import{jsxs as o,jsx as r}from"react/jsx-runtime";import{useTheme as t}from"../../core/theme/Theme.js";import{ComponentSize as
|
|
1
|
+
import{__rest as i,__assign as e}from"tslib";import{jsxs as o,jsx as r}from"react/jsx-runtime";import{useTheme as t}from"../../core/theme/Theme.js";import{ComponentSize as s}from"../../types/enums.js";import{StyledBaseButton as m,ProgressBar as n,StyledIcon as d}from"./styled.js";var a=function(a){var l,p,g,h,v=a.text,f=a.wide,c=void 0!==f&&f,u=a.size,w=void 0===u?s.Medium:u,x=a.iconName,j=a.icon,z=a.alignItems,I=a.progress,b=i(a,["text","wide","size","iconName","icon","alignItems","progress"]),y=t(),N="right",E="10px",L="24px";if(j){if(!j.name)throw new Error("name must be provided when using the icon prop");h=j.name,N=null!==(l=j.position)&&void 0!==l?l:N,E=null!==(p=j.margin)&&void 0!==p?p:E,L=null!==(g=j.size)&&void 0!==g?g:L}else h=x;var M={fill:y.colors.shades.white.color,name:h,width:L,height:L};return o(m,e({},b,{wide:c,size:w,alignItems:z},{children:[!!I&&I>0&&r(n,{progress:I},void 0),h&&"left"===N&&r(d,e({},M,{marginRight:E}),void 0),v,h&&"right"===N&&r(d,e({},M,{marginLeft:E}),void 0)]}),void 0)};export{a as default};
|
|
2
2
|
//# sourceMappingURL=BaseCTA.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("tslib"),i=require("react/jsx-runtime"),s=require("../../core/theme/Theme.js"),r=require("../../types/enums.js"),
|
|
1
|
+
"use strict";var e=require("tslib"),i=require("react/jsx-runtime"),s=require("../../core/theme/Theme.js"),r=require("../../types/enums.js"),o=require("./styled.js");module.exports=function(t){var n,d,a,l,m=t.text,u=t.wide,g=void 0!==u&&u,h=t.size,c=void 0===h?r.ComponentSize.Medium:h,v=t.iconName,p=t.icon,x=t.alignItems,j=t.progress,w=e.__rest(t,["text","wide","size","iconName","icon","alignItems","progress"]),_=s.useTheme(),f="right",q="10px",y="24px";if(p){if(!p.name)throw new Error("name must be provided when using the icon prop");l=p.name,f=null!==(n=p.position)&&void 0!==n?n:f,q=null!==(d=p.margin)&&void 0!==d?d:q,y=null!==(a=p.size)&&void 0!==a?a:y}else l=v;var z={fill:_.colors.shades.white.color,name:l,width:y,height:y},I=!!j&&j>0;return i.jsxs(o.StyledBaseButton,e.__assign({},w,{wide:g,size:c,alignItems:x},{children:[I&&i.jsx(o.ProgressBar,{progress:j},void 0),l&&"left"===f&&i.jsx(o.StyledIcon,e.__assign({},z,{marginRight:q}),void 0),m,l&&"right"===f&&i.jsx(o.StyledIcon,e.__assign({},z,{marginLeft:q}),void 0)]}),void 0)};
|
|
2
2
|
//# sourceMappingURL=BaseCTA.js.map
|
package/package.json
CHANGED