MCPcopy Create free account
hub / github.com/LearnPrompt/LearnPrompt / Button

Function Button

src/components/Button.js:3–34  ·  view source on GitHub ↗
({ className, onClick, text, icon, type = "normal" })

Source from the content-addressed store, hash-verified

1import React from "react";
2
3function Button({ className, onClick, text, icon, type = "normal" }) {
4 switch (type) {
5 case "normal":
6 return (
7 <div
8 onClick={onClick}
9 className={
10 "flex items-center rounded-full gap-1 justify-center px-7 py-2 brand-button text-white cursor-pointer transition-all drop-shadow-md hover:shadow-md font-semibold" +
11 " " +
12 className
13 }
14 >
15 <div>{text}</div>
16 <div className="font-medium text-xl ">{icon}</div>
17 </div>
18 );
19 case "white":
20 return (
21 <div
22 onClick={onClick}
23 className={
24 "flex items-center rounded-full gap-1 justify-center px-7 py-2 bg-white text-green/300 cursor-pointer transition-all hover:shadow-md font-semibold" +
25 " " +
26 className
27 }
28 >
29 <div>{text}</div>
30 <div className="font-medium text-xl ">{icon}</div>
31 </div>
32 );
33 }
34}
35
36export default Button;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected