1 line
2.3 KiB
JavaScript
1 line
2.3 KiB
JavaScript
import{a as m,n as c}from"./utils-09ff0c0e.js";import{a as f,t as k,b as p,f as h,g,d as y,h as u,i as _,j as v,u as w,l as C,v as z}from"./lifecycle-9898a056.js";import{S as B,i as j}from"./index-d94d5794.js";function V(o){let t,i,s,l,r;return{c(){t=f("button"),i=k(o[1]),this.h()},l(e){t=p(e,"BUTTON",{type:!0,class:!0,style:!0});var n=h(t);i=g(n,o[1]),n.forEach(y),this.h()},h(){u(t,"type","button"),u(t,"class",s=["storybook-button",`storybook-button--${o[0]}`,o[3]].join(" ")),u(t,"style",o[2])},m(e,n){_(e,t,n),v(t,i),l||(r=w(t,"click",o[6]),l=!0)},p(e,[n]){n&2&&C(i,e[1]),n&9&&s!==(s=["storybook-button",`storybook-button--${e[0]}`,e[3]].join(" "))&&u(t,"class",s),n&4&&u(t,"style",e[2])},i:c,o:c,d(e){e&&y(t),l=!1,r()}}}function S(o,t,i){let s,l,{primary:r=!1}=t,{backgroundColor:e=void 0}=t,{size:n="medium"}=t,{label:d=""}=t;function b(a){z.call(this,o,a)}return o.$$set=a=>{"primary"in a&&i(4,r=a.primary),"backgroundColor"in a&&i(5,e=a.backgroundColor),"size"in a&&i(0,n=a.size),"label"in a&&i(1,d=a.label)},o.$$.update=()=>{o.$$.dirty&16&&i(3,s=r?"storybook-button--primary":"storybook-button--secondary"),o.$$.dirty&32&&i(2,l=e?`background-color: ${e}`:"")},[n,d,l,s,r,e,b]}class T extends B{constructor(t){super(),j(this,t,S,V,m,{primary:4,backgroundColor:5,size:0,label:1})}}T.__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{T as B};
|