File tree Expand file tree Collapse file tree 6 files changed +9
-10
lines changed Expand file tree Collapse file tree 6 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ const Checkbox: React.FC<CheckboxProps> = ({
13
13
label,
14
14
labelWhenChecked,
15
15
layout = 'box' ,
16
- name,
16
+ name = '' ,
17
17
onChange,
18
18
onBlur,
19
19
validation,
Original file line number Diff line number Diff line change 1
-
2
-
3
1
export type ValidateCheckbox = {
4
2
required ?: boolean ;
5
3
} ;
@@ -43,7 +41,7 @@ export interface CheckboxProps {
43
41
/**
44
42
* a name attribute to group checkboxes
45
43
*/
46
- name : string ;
44
+ name ? : string ;
47
45
48
46
/**
49
47
* The normal onChange event
Original file line number Diff line number Diff line change @@ -110,6 +110,7 @@ NoIconLink.args = {
110
110
111
111
text : 'Email Us' ,
112
112
type : 'email' ,
113
+ iconLayout : 'none' ,
113
114
} ;
114
115
115
116
export const InternalLink : ComponentStory < typeof LinkTo > = Template . bind ( { } ) ;
Original file line number Diff line number Diff line change @@ -44,11 +44,11 @@ const SpanStyledFlex = styled.span<TStyleProps>`
44
44
flex-direction: ${ ( { iconLayout } ) =>
45
45
iconLayout === 'leading' ? 'row' : 'row-reverse' } ;
46
46
margin: ${ ( p ) =>
47
- p . iconLayout === 'leading' ? '0 2px 0 4px' : '0 4px 0 2px' } ;
47
+ p . iconLayout === 'leading' ? 'auto 2px auto 4px' : 'auto 4px auto 2px' } ;
48
48
49
49
svg {
50
50
margin: ${ ( p ) =>
51
- p . iconLayout === 'leading' ? '0 4px 0 0' : '0 0 0 4px' } ;
51
+ p . iconLayout === 'leading' ? 'auto 4px auto 0' : 'auto 0 auto 4px' } ;
52
52
}
53
53
` ;
54
54
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ const LinkTo: React.FC<LinkToProps> = ({
10
10
address,
11
11
text,
12
12
type = 'external' ,
13
- iconLayout = 'none ' ,
13
+ iconLayout = 'leading ' ,
14
14
...props
15
15
} ) => {
16
16
const renderContent = ( ) => (
@@ -22,15 +22,15 @@ const LinkTo: React.FC<LinkToProps> = ({
22
22
title = "mail icon"
23
23
titleId = "linkto mail icon"
24
24
fill = { color . blue }
25
- fontSize = { 24 }
25
+ fontSize = { 18 }
26
26
style = { { marginTop : 'auto' } }
27
27
/>
28
28
) : (
29
29
< Link
30
30
title = "link icon"
31
31
titleId = "linkto link icon"
32
32
fill = { color . blue }
33
- fontSize = { 24 }
33
+ fontSize = { 18 }
34
34
style = { { marginTop : 'auto' } }
35
35
/>
36
36
) ) }
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ const Todo: React.FC<TodoProps> = ({
44
44
} ;
45
45
46
46
const addTodo = ( ) => {
47
+ if ( inputValue == '' ) return ;
47
48
setLists ( ( prevTodo ) => Array . from ( new Set ( [ ...prevTodo , inputValue ] ) ) ) ;
48
49
setInputValue ( '' ) ;
49
50
const input : HTMLInputElement | null = document . querySelector (
@@ -63,7 +64,6 @@ const Todo: React.FC<TodoProps> = ({
63
64
size = "large"
64
65
validation = { {
65
66
regExp : pattern ,
66
- required : true ,
67
67
} }
68
68
key = { key }
69
69
value = { inputValue }
You can’t perform that action at this time.
0 commit comments