File tree Expand file tree Collapse file tree 3 files changed +45
-0
lines changed
Expand file tree Collapse file tree 3 files changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ import React , { ReactNode , ButtonHTMLAttributes } from "react" ;
2+
3+ interface ButtonProps extends ButtonHTMLAttributes < HTMLButtonElement > {
4+ children : ReactNode ;
5+ width ?: string ;
6+ height ?: string ;
7+ radius ?: string ;
8+ color ?: "positive" | "negative" ;
9+ size ?: string ;
10+ }
11+
12+ const Button = ( {
13+ children,
14+ width = "auto" ,
15+ height = "53px" ,
16+ radius = "8px" ,
17+ color = "positive" ,
18+ size = "18px" ,
19+ ...props
20+ } : ButtonProps ) => {
21+ const backgroundStyle =
22+ color === "positive"
23+ ? "linear-gradient(90.99deg, #6D6AFE 0.12%, #6AE3FE 101.84%)"
24+ : "#FF5B56" ;
25+
26+ return (
27+ < button
28+ style = { {
29+ width,
30+ height,
31+ borderRadius : radius ,
32+ background : backgroundStyle ,
33+ fontSize : size ,
34+ } }
35+ className = "flex justify-center items-center text-white font-[600] whitespace-nowrap hover:opacity-90"
36+ { ...props }
37+ >
38+ { children }
39+ </ button >
40+ ) ;
41+ } ;
42+
43+ export default Button ;
Original file line number Diff line number Diff line change 1212
1313: root {
1414 --background : # ffffff ;
15+ --white200 : # f5f5f5 ;
1516 --black100 : # 000 ;
1617 --black200 : # 111322 ;
1718 --black300 : # 373740 ;
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ const config: Config = {
2020 gray400 : "var(--gray400)" ,
2121 gray500 : "var(--gray500)" ,
2222 purple100 : "var(--purple100)" ,
23+ white200 : "var(--white200)" ,
2324 } ,
2425 screens : {
2526 sm : "375px" ,
You can’t perform that action at this time.
0 commit comments