File tree Expand file tree Collapse file tree 2 files changed +71
-1
lines changed
src/app/components/textInput Expand file tree Collapse file tree 2 files changed +71
-1
lines changed Original file line number Diff line number Diff line change 1+ "use client" ;
2+
3+ import { ChangeEvent , useState } from "react" ;
4+ import { LuEye , LuEyeOff } from "react-icons/lu" ;
5+
6+ interface InputProp {
7+ type : string ;
8+ name ?: string ;
9+ register ?: boolean ;
10+ errors ?: boolean ;
11+ rules ?: boolean ;
12+ size ?: string ;
13+ value ?: string ;
14+ className ?: string ;
15+ onChange : ( e : ChangeEvent < HTMLInputElement > ) => void ;
16+ }
17+ const TextInput = ( props : InputProp ) => {
18+ const [ eyeOn , setEyeOn ] = useState ( false ) ;
19+ const toggleType = ( ) => {
20+ setEyeOn ( ! eyeOn ) ;
21+ } ;
22+ return (
23+ < >
24+ < label > { props . name } </ label >
25+ < input type = { props . type } value = { props . value } onChange = { props . onChange } />
26+ { props . type === "password" && < div onClick = { toggleType } > { eyeOn ? < LuEye /> : < LuEyeOff /> } </ div > }
27+ </ >
28+ ) ;
29+ } ;
30+
31+ export default TextInput ;
Original file line number Diff line number Diff line change @@ -9,8 +9,47 @@ const config: Config = {
99 theme : {
1010 extend : {
1111 colors : {
12- background : "var(--background)" ,
1312 foreground : "var(--foreground)" ,
13+ black : {
14+ 100 : "#6B6B6B" ,
15+ 200 : "#525252" ,
16+ 300 : "#373737" ,
17+ 400 : "#1F1F1F" ,
18+ 500 : "#040404" ,
19+ } ,
20+ grayscale : {
21+ 100 : "#DEDEDE" ,
22+ 200 : "#C4C4C4" ,
23+ 300 : "#ABABAB" ,
24+ 400 : "#999999" ,
25+ 500 : "#808080" ,
26+ } ,
27+ primary : {
28+ orange : {
29+ 50 : "#FFF7EB" ,
30+ 100 : "#FCC369" ,
31+ 200 : "#FBAF37" ,
32+ 300 : "#F89A05" ,
33+ 400 : "#E18C05" ,
34+ } ,
35+ blue : {
36+ 100 : "#535779" ,
37+ 200 : "#3E415B" ,
38+ 300 : "#2A2C3D" ,
39+ } ,
40+ } ,
41+ background : {
42+ 100 : "#FCFCFC" ,
43+ 200 : "#F7F7F7" ,
44+ 300 : "#EFEFEF" ,
45+ } ,
46+ line : {
47+ 100 : "#F2F2F2" ,
48+ 200 : "#E6E6E6" ,
49+ } ,
50+ state : {
51+ error : "FC4100" ,
52+ } ,
1453 } ,
1554 fontFamily : {
1655 sans : [
You canโt perform that action at this time.
0 commit comments