({ className, onClick, text, icon, type = "normal" })
| 1 | import React from "react"; |
| 2 | |
| 3 | function 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 | |
| 36 | export default Button; |
nothing calls this directly
no outgoing calls
no test coverage detected