1
1
import { whitelistProps } from "./utils"
2
2
3
- export const CheckBoxTag = ( { checkedValue = 1 , uncheckedValue = 0 , ...props } ) => {
3
+ export const CheckBoxTag = ( {
4
+ checkedValue = 1 ,
5
+ uncheckedValue = 0 ,
6
+ ...props
7
+ } ) => {
4
8
return (
5
9
< span >
6
10
< HiddenFieldTag name = { props . name } value = { uncheckedValue } />
@@ -9,86 +13,48 @@ export const CheckBoxTag = ({ checkedValue = 1, uncheckedValue = 0, ...props })
9
13
)
10
14
}
11
15
12
- export const ColorFieldTag = ( props ) => (
13
- < input type = "color" { ...props } />
14
- )
16
+ export const ColorFieldTag = props => < input type = "color" { ...props } />
15
17
16
- export const DateFieldTag = ( props ) => (
17
- < input type = "date" { ...props } />
18
- )
18
+ export const DateFieldTag = props => < input type = "date" { ...props } />
19
19
20
- export const DatetimeFieldTag = ( props ) => (
21
- < input type = "datetime" { ...props } />
22
- )
20
+ export const DatetimeFieldTag = props => < input type = "datetime" { ...props } />
23
21
24
- export const DatetimeLocalFieldTag = ( props ) => (
22
+ export const DatetimeLocalFieldTag = props => (
25
23
< input type = "datetime-local" { ...props } />
26
24
)
27
25
28
- export const EmailFieldTag = ( props ) => (
29
- < input type = "email" { ...props } />
30
- )
26
+ export const EmailFieldTag = props => < input type = "email" { ...props } />
31
27
32
- export const HiddenFieldTag = ( props ) => (
28
+ export const HiddenFieldTag = props => (
33
29
< input type = "hidden" readOnly { ...props } />
34
30
)
35
31
36
- export const LabelTag = ( props ) => (
37
- < label { ...whitelistProps ( props ) } />
38
- )
32
+ export const LabelTag = props => < label { ...whitelistProps ( props ) } />
39
33
40
- export const MonthFieldTag = ( props ) => (
41
- < input type = "month" { ...props } />
42
- )
34
+ export const MonthFieldTag = props => < input type = "month" { ...props } />
43
35
44
- export const NumberFieldTag = ( props ) => (
45
- < input type = "number" { ...props } />
46
- )
36
+ export const NumberFieldTag = props => < input type = "number" { ...props } />
47
37
48
- export const PasswordFieldTag = ( props ) => (
49
- < input type = "password" { ...props } />
50
- )
38
+ export const PasswordFieldTag = props => < input type = "password" { ...props } />
51
39
52
- export const RadioTag = ( props ) => (
53
- < input type = "radio" { ...props } />
54
- )
40
+ export const RadioTag = props => < input type = "radio" { ...props } />
55
41
56
- export const RangeFieldTag = ( props ) => (
57
- < input type = "range" { ...props } />
58
- )
42
+ export const RangeFieldTag = props => < input type = "range" { ...props } />
59
43
60
- export const SearchFieldTag = ( props ) => (
61
- < input type = "search" { ...props } />
62
- )
44
+ export const SearchFieldTag = props => < input type = "search" { ...props } />
63
45
64
- export const SelectTag = ( props ) => (
65
- < select { ...whitelistProps ( props ) } />
66
- )
46
+ export const SelectTag = props => < select { ...whitelistProps ( props ) } />
67
47
68
- export const SubmitTag = ( props ) => (
69
- < input type = "submit" { ...props } />
70
- )
48
+ export const SubmitTag = props => < input type = "submit" { ...props } />
71
49
72
- export const TelephoneFieldTag = ( props ) => (
73
- < input type = "tel" { ...props } />
74
- )
50
+ export const TelephoneFieldTag = props => < input type = "tel" { ...props } />
75
51
76
- export const TextAreaTag = ( props ) => (
77
- < textarea { ...whitelistProps ( props ) } />
78
- )
52
+ export const TextAreaTag = props => < textarea { ...whitelistProps ( props ) } />
79
53
80
- export const TextFieldTag = ( props ) => (
81
- < input type = "text" { ...props } />
82
- )
54
+ export const TextFieldTag = props => < input type = "text" { ...props } />
83
55
84
- export const TimeFieldTag = ( props ) => (
85
- < input type = "time" { ...props } />
86
- )
56
+ export const TimeFieldTag = props => < input type = "time" { ...props } />
87
57
88
- export const UrlFieldTag = ( props ) => (
89
- < input type = "url" { ...props } />
90
- )
58
+ export const UrlFieldTag = props => < input type = "url" { ...props } />
91
59
92
- export const WeekFieldTag = ( props ) => (
93
- < input type = "week" { ...props } />
94
- )
60
+ export const WeekFieldTag = props => < input type = "week" { ...props } />
0 commit comments