dsm-button
Version:
dsm-button is a customizable, reusable button component built with Mantine, featuring skeleton loading, tooltip support, and icon integration. It offers a smooth user experience with TypeScript support for easy integration in React applications.
2 lines • 1.52 kB
JavaScript
;Object.defineProperty(exports, "__esModule", {value: true});var b=Object.defineProperty,k=Object.defineProperties;var B=Object.getOwnPropertyDescriptors;var s=Object.getOwnPropertySymbols;var d=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable;var f=(t,o,e)=>o in t?b(t,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[o]=e,r=(t,o)=>{for(var e in o||(o={}))d.call(o,e)&&f(t,e,o[e]);if(s)for(var e of s(o))c.call(o,e)&&f(t,e,o[e]);return t},l=(t,o)=>k(t,B(o));var p=(t,o)=>{var e={};for(var n in t)d.call(t,n)&&o.indexOf(n)<0&&(e[n]=t[n]);if(t!=null&&s)for(var n of s(t))o.indexOf(n)<0&&c.call(t,n)&&(e[n]=t[n]);return e};var _core = require('@mantine/core');var _iconsreact = require('@tabler/icons-react');var S={};var _jsxruntime = require('react/jsx-runtime');var u=t=>{let i=t,{visible:o,width:e=100}=i,n=p(i,["visible","width"]);return _jsxruntime.jsx.call(void 0, _core.Skeleton,r({visible:o,width:o?e:"fit-content",radius:4},n))};var C=t=>{let a=t,{tooltipProps:o={label:""},children:e,skeletonProps:n={visible:!1}}=a,i=p(a,["tooltipProps","children","skeletonProps"]);return _jsxruntime.jsx.call(void 0, u,l(r({},n),{children:_jsxruntime.jsx.call(void 0, _core.Tooltip,l(r({label:"",withArrow:!0,arrowSize:8,disabled:!(o!=null&&o.label)},o),{children:_jsxruntime.jsx.call(void 0, _core.Button,l(r({leftSection:_jsxruntime.jsx.call(void 0, _iconsreact.IconPhoto,{size:16}),classNames:S},i),{children:e}))}))}))};exports.DSMButton = C;
//# sourceMappingURL=index.js.map