ladle-inject-custom-addons
Version:
Adds a button to the Ladle addon bar
2 lines (1 loc) • 902 B
JavaScript
function t(...e){return e.flat().filter(o=>o&&!!o.trim()).join(" ")}import{jsx as c}from"react/jsx-runtime";var r=({icon:e,...o})=>c("button",{...o,className:t("ladle-button",o.className),style:{height:36,width:36,borderColor:"transparent",boxShadow:"none",...o.style},children:e});import{jsx as n,jsxs as i}from"react/jsx-runtime";var d=({size:e=24,...o})=>n("svg",{width:e,height:e,viewBox:"0 0 24 24",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",...o}),l=({size:e=18,...o})=>i(d,{size:e,...o,children:[n("path",{d:"M0 0h24v24H0z",stroke:"none"}),n("path",{d:"M18 6L6 18M6 6l12 12"})]});import{jsx as a}from"react/jsx-runtime";var v=({iconProps:e,wrapperProps:o,...s})=>a("div",{...o,style:{position:"absolute",insetInlineEnd:-6,top:0,...o?.style},children:a(r,{"aria-label":"Close modal",...s,icon:a(l,{...e})})});export{v as LadleDialogCloseButton};