@promotedai/react-introspection
Version:
Promoted Introspection integration for React web apps
3 lines (2 loc) • 2.35 kB
JavaScript
import{makeStyles as e,Button as t,Box as a,Typography as r}from"@material-ui/core";import i from"react";import o from"@material-ui/core/colors/blue";const n=e=>({button:{"&.MuiButton-contained":{background:o[700],color:"white"},fontSize:"12px",marginLeft:e.spacing(1)},tabContentContainer:{columnGap:e.spacing(1),display:"grid",padding:"10px 20px 20px 20px",rowGap:e.spacing(1)},buttonContainer:{alignContent:"center",gridColumn:"1 / 5",marginTop:e.spacing(1),textAlign:"right",marginLeft:"auto"}}),s=e({"@keyframes fillKeyFrames":{"100%":{boxShadow:"inset 0 0 0 100vh var(--checkmark-fill-color)"},"@keyframes scaleKeyFrames":{"0%":{transform:"none"},"100%":{transform:"none"},"50%":{transform:"scale3d(1.1, 1.1, 1)"}}},"@keyframes strokeKeyFrames":{"100%":{strokeDashoffset:"0"}},checkmark:{width:"16px",height:"16px",display:"block",marginLeft:"auto",marginRight:"auto",borderRadius:"50%",stroke:"#7ac142",strokeWidth:"5",strokeMiterlimit:10,animation:"$fillKeyFrames 0.4s ease-in-out 0.4s forwards, $scaleKeyFrames 0.3s ease-in-out 0.9s both"},circle:{strokeDasharray:"166",strokeDashoffset:"166",strokeWidth:"5",strokeMiterlimit:10,stroke:"#7ac142",fill:"none",animation:"$strokeKeyFrames 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards"},path:{transformOrigin:"50% 50%",strokeDasharray:"48",strokeDashoffset:"48",animation:"$strokeKeyFrames 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards"}}),l=()=>{const e=s();return i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:e.checkmark,viewBox:"0 0 52 52"},i.createElement("circle",{cx:"26",cy:"26",r:"25",fill:"none",className:e.circle}),i.createElement("path",{fill:"none",d:"M14.1 27.2l7.1 7.2 16.7-16.8",className:e.path}))},c=e({copied:{alignContent:"center",display:"inline-grid",gridTemplateColumns:"repeat(3, 1fr)",marginRight:"8px",verticalAlign:"middle"},copied__inner:{gridColumn:"1 / 2",marginRight:"4px"},copied__text:{fontSize:14,gridColumn:"2 / 4"}}),m=e(n),p=({handleCopy:e,copyButtonVisible:o,label:n="Copy",finishedLabel:s="Copied"})=>{const p=c(),d=m();return o?i.createElement(t,{className:d.button,onClick:e,variant:"outlined"},n):i.createElement(a,{className:p.copied},i.createElement(a,{className:p.copied__inner},i.createElement(l,null)),i.createElement(r,{className:p.copied__text},s))};export{p as C,n as s};
//# sourceMappingURL=CopyButton-630e99b4.js.map