Build 533169stable
Module 886532
2,085 characters · in 8ca8e75ac844d6c8.jsDependencies
Source Raw
function(e,t,l){l.d(t,{H:()=>m});var a=l(627968),n=l(64700),r=l(292666),i=l(732955),o=l(397927),s=l(398590),d=l(920050),c=l(744064),u=l(976860),p=l(652215);let m={title:"Perks",stories:[{name:"Perk Card",component:function(e){let{...t}=e;return(0,a.jsxs)("div",{style:{maxWidth:"100%",width:t.featured?752:364},children:[(0,a.jsx)(c.S,{...t,id:"test-id",progress:null!=t.progress&&t.progress>0?t.progress:void 0,onCtaClick:()=>(0,o.showToast)((0,o.createToast)("CTA Clicked!",o.ToastType.SUCCESS))}),(0,a.jsx)(h,{})]})},id:"perk-card",controls:{title:{label:"Title",type:"text",defaultValue:"Perk Title"},description:{label:"Description",type:"text",defaultValue:"This is the perk description. When hovered or focused, it will be revealed in full."},caption:{label:"Caption",type:"text",defaultValue:""},pillText:{label:"Pill Text",type:"text",defaultValue:""},primaryAsset:{label:"Primary Asset",type:"text",defaultValue:"https://i.imgur.com/xJL1c3t.png"},backgroundAssetUrl:{label:"Background Asset",type:"text",defaultValue:""},ctaText:{label:"CTA Text",type:"text",defaultValue:"Learn More"},progress:{label:"Progress (0 - 1.0)",type:"slider",defaultValue:0,minValue:0,maxValue:1},featured:{label:"Featured",type:"boolean",defaultValue:!1},glowing:{label:"Glowing",type:"boolean",defaultValue:!1},blurTint:{label:"Blur Tint",type:"color",defaultValue:void 0}}}]};function h(){let[e,t]=(0,n.useState)("customSounds"),l=`${p.BVt.NITRO_HOME}?perk=${e}`;return(0,a.jsxs)("div",{style:{marginTop:64,display:"flex",flexDirection:"column",gap:10},children:[(0,a.jsx)(r.k,{label:"Deep Linking",value:e,onChange:e=>t(e),placeholder:"Perk ID"}),(0,a.jsx)(i.$nd,{text:"Test Deep Link",variant:"primary",size:"sm",onClick:()=>{(0,s.jH)(),(0,u.pX)(p.BVt.ME),setTimeout(()=>(0,u.pX)(l),200)}}),(0,a.jsxs)(o.Text,{variant:"text-xs/normal",color:"text-muted",style:{userSelect:"text"},children:["IDs from PerkCardIds.tsx:",(0,a.jsx)("ul",{style:{margin:"4px 0 0",paddingLeft:24,listStyleType:"disc",columns:3,columnGap:24},children:Object.values(d).map(e=>(0,a.jsx)("li",{children:e},e))})]})]})}}