MCPcopy
hub / github.com/adrianhajdin/brainwave / ButtonSvg

Function ButtonSvg

src/assets/svg/ButtonSvg.jsx:1–58  ·  view source on GitHub ↗
(white)

Source from the content-addressed store, hash-verified

1const ButtonSvg = (white) => (
2 <>
3 <svg
4 className="absolute top-0 left-0"
5 width="21"
6 height="44"
7 viewBox="0 0 21 44"
8 >
9 <path
10 fill={white ? "white" : "none"}
11 stroke={white ? "white" : "url(#btn-left)"} // mentioned in ButtonGradient.jsx
12 strokeWidth="2"
13 d="M21,43.00005 L8.11111,43.00005 C4.18375,43.00005 1,39.58105 1,35.36365 L1,8.63637 C1,4.41892 4.18375,1 8.11111,1 L21,1"
14 />
15 </svg>
16 <svg
17 className="absolute top-0 left-[1.3125rem] w-[calc(100%-2.625rem)]"
18 height="44"
19 viewBox="0 0 100 44"
20 preserveAspectRatio="none"
21 fill={white ? "white" : "none"}
22 >
23 {white ? (
24 <polygon
25 fill="white"
26 fillRule="nonzero"
27 points="100 0 100 44 0 44 0 0"
28 />
29 ) : (
30 <>
31 <polygon
32 fill="url(#btn-top)" // mentioned in ButtonGradient.jsx
33 fillRule="nonzero"
34 points="100 42 100 44 0 44 0 42"
35 />
36 <polygon
37 fill="url(#btn-bottom)" // mentioned in ButtonGradient.jsx
38 fillRule="nonzero"
39 points="100 0 100 2 0 2 0 0"
40 />
41 </>
42 )}
43 </svg>
44 <svg
45 className="absolute top-0 right-0"
46 width="21"
47 height="44"
48 viewBox="0 0 21 44"
49 >
50 <path
51 fill={white ? "white" : "none"}
52 stroke={white ? "white" : "url(#btn-right)"} // mentioned in ButtonGradient.jsx
53 strokeWidth="2"
54 d="M0,43.00005 L5.028,43.00005 L12.24,43.00005 C16.526,43.00005 20,39.58105 20,35.36365 L20,16.85855 C20,14.59295 18.978,12.44425 17.209,10.99335 L7.187,2.77111 C5.792,1.62675 4.034,1 2.217,1 L0,1"
55 />
56 </svg>
57 </>
58);
59
60export default ButtonSvg;

Callers 2

renderButtonFunction · 0.85
renderLinkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected