Anvil/assets/Button-880c7a21.js
André Jaenisch 5cbc208247
Updates
2024-02-08 10:52:22 +01:00

1 line
2.2 KiB
JavaScript

import{S as m,i as f,s as k,n as d}from"./index-29d97ebc.js";import{e as p,t as h,c as g,b as _,m as v,h as y,i as u,j as w,k as C,p as z,n as B,q as j}from"./lifecycle-1566062d.js";function V(o){let t,i,a,l,r;return{c(){t=p("button"),i=h(o[1]),this.h()},l(e){t=g(e,"BUTTON",{type:!0,class:!0,style:!0});var n=_(t);i=v(n,o[1]),n.forEach(y),this.h()},h(){u(t,"type","button"),u(t,"class",a=["storybook-button",`storybook-button--${o[0]}`,o[3]].join(" ")),u(t,"style",o[2])},m(e,n){w(e,t,n),C(t,i),l||(r=z(t,"click",o[6]),l=!0)},p(e,[n]){n&2&&B(i,e[1]),n&9&&a!==(a=["storybook-button",`storybook-button--${e[0]}`,e[3]].join(" "))&&u(t,"class",a),n&4&&u(t,"style",e[2])},i:d,o:d,d(e){e&&y(t),l=!1,r()}}}function q(o,t,i){let a,l,{primary:r=!1}=t,{backgroundColor:e=void 0}=t,{size:n="medium"}=t,{label:c=""}=t;function b(s){j.call(this,o,s)}return o.$$set=s=>{"primary"in s&&i(4,r=s.primary),"backgroundColor"in s&&i(5,e=s.backgroundColor),"size"in s&&i(0,n=s.size),"label"in s&&i(1,c=s.label)},o.$$.update=()=>{o.$$.dirty&16&&i(3,a=r?"storybook-button--primary":"storybook-button--secondary"),o.$$.dirty&32&&i(2,l=e?`background-color: ${e}`:"")},[n,c,l,a,r,e,b]}class S extends m{constructor(t){super(),f(this,t,q,V,k,{primary:4,backgroundColor:5,size:0,label:1})}}S.__docgen={version:3,name:"Button.svelte",data:[{keywords:[],visibility:"public",description:"Is this the principal call to action on the page?",name:"primary",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"boolean",type:"boolean"},defaultValue:!1},{keywords:[],visibility:"public",description:"What background color to use",name:"backgroundColor",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"any",type:"any"}},{keywords:[],visibility:"public",description:"How large should the button be?",name:"size",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"string",type:"string"},defaultValue:"medium"},{keywords:[],visibility:"public",description:"Button contents",name:"label",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"string",type:"string"},defaultValue:""}],computed:[],methods:[],components:[],description:null,keywords:[],events:[{keywords:[],visibility:"public",description:"",name:"click",parent:"button",modificators:[],locations:null}],slots:[],refs:[]};export{S as B};