@wishket/design-system 1.0.3 → 1.0.4
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 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),r=require("tailwind-merge"),i=require("../SystemIcon/SystemIcon.js"),t=require("../CountBadge/CountBadge.js");exports.ButtonContainer=function(o){function a(){return"solid"===l&&c?"text-w-white":"outline_filled"===l&&c||c?"text-primary-100":"solid"===l?"text-w-white":"text-primary-500"}var s=o.rounded,d=o.size,n=o.type,l=o.variant,p=o.children,x=o.leadingIcon,m=o.isLeadingIconSolid,m=void 0!==m&&m,g=o.trailingIcon,b=o.isTrailingIconSolid,b=void 0!==b&&b,u=o.badgeNumber,u=void 0===u?"":u,y=o.className,c=o.disabled,o=o.onClick;return e.jsxs("button",{className:r.twMerge("box-border flex w-fit cursor-pointer items-center justify-center border","outlined"===l&&s?"rounded-full":"rounded-xl","sm"===d?"h-[36px] px-[11px] text-sm leading-6 gap-x-1":"lg"===d?"h-[60px] px-[23px] text-[20px] leading-[30px] gap-x-2":"h-[50px] px-[15px] text-base leading-[26px] gap-x-1.5",a(),"solid"===l?"bg-primary-500 border-primary-500 hover:border-primary-700 hover:bg-primary-700":"outline_filled"===l?"bg-primary-10 border-primary-200 hover:border-primary-500":"bg-w-white border-w-gray-200 hover:border-primary-500",c&&"cursor-not-allowed",c&&("solid"===l?"bg-primary-100 border-primary-100 hover:bg-primary-100 hover:border-primary-100":"outline_filled"===l?"bg-primary-10 border-primary-200 hover:border-primary-200":"bg-w-white border-w-gray-200 hover:border-w-gray-200"),y),onClick:o,disabled:c,type:n,children:[x&&e.jsx(i,{name:x,solid:m,testId:"design-system-button--leading-icon",className:r.twMerge("flex-shrink-0","sm"===d?"size-[14px]":"size-4",a())}),p,g&&e.jsx(i,{name:g,solid:b,testId:"design-system-button--trailing-icon",className:r.twMerge("flex-shrink-0","sm"===d?"size-[14px]":"size-4",a())}),u&&e.jsx(t,{text:u,className:"relative flex-shrink-0"})]})};
|