File tree Expand file tree Collapse file tree 5 files changed +14
-4
lines changed Expand file tree Collapse file tree 5 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ export interface propsBaseBtns {
19
19
isLoading ?: boolean
20
20
onClick ?: ( e : React . MouseEvent < HTMLElement > ) => void
21
21
rightIcon ?: React . ReactElement
22
+ role ?: 'button' | 'link'
22
23
size ?: 'regular' | 'small'
23
24
type ?: 'button' | 'submit' | 'reset'
24
25
tabIndex ?: number
@@ -57,6 +58,7 @@ export function Btn({
57
58
m = '0' ,
58
59
onClick,
59
60
rightIcon,
61
+ role = 'button' ,
60
62
rounded = false ,
61
63
size = 'regular' ,
62
64
touchDark = false ,
@@ -88,7 +90,7 @@ export function Btn({
88
90
< Button
89
91
aria-label = { ariaLabel }
90
92
id = { id }
91
- role = "button"
93
+ role = { role }
92
94
bg = { colorMain }
93
95
borderRadius = { borderRadius }
94
96
color = { color }
Original file line number Diff line number Diff line change @@ -10,19 +10,21 @@ export interface props {
10
10
id ?: string
11
11
m ?: string
12
12
onClick ?: ( e : React . MouseEvent < HTMLElement > ) => void
13
+ role ?: 'button' | 'link'
13
14
tabIndex ?: number
14
15
textDecorationLine ?: boolean
15
16
}
16
17
17
18
export function BtnLink ( {
18
- as = 'button ' ,
19
+ as = 'a ' ,
19
20
ariaLabel,
20
21
children,
21
22
fontSize = '0.875rem' ,
22
23
href = '' ,
23
24
id,
24
25
m = '0' ,
25
26
onClick,
27
+ role = 'link' ,
26
28
tabIndex,
27
29
textDecorationLine = true ,
28
30
} : props ) : JSX . Element {
@@ -41,7 +43,7 @@ export function BtnLink({
41
43
as = { as }
42
44
aria-label = { ariaLabel }
43
45
id = { id }
44
- role = "button"
46
+ role = { role }
45
47
backgroundColor = "transparent"
46
48
borderStyle = "none"
47
49
className = "linkButton"
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ export function BtnPrimary({
32
32
isLoading = false ,
33
33
onClick,
34
34
rightIcon,
35
+ role = 'button' ,
35
36
size = 'regular' ,
36
37
type = 'button' ,
37
38
tabIndex,
@@ -48,6 +49,7 @@ export function BtnPrimary({
48
49
m = { m }
49
50
onClick = { onClick }
50
51
rightIcon = { rightIcon }
52
+ role = { role }
51
53
size = { size }
52
54
type = { type }
53
55
tabIndex = { tabIndex }
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ export function BtnSecondary({
33
33
isLoading = false ,
34
34
onClick,
35
35
rightIcon,
36
+ role = 'button' ,
36
37
size = 'regular' ,
37
38
type = 'button' ,
38
39
tabIndex,
@@ -56,6 +57,7 @@ export function BtnSecondary({
56
57
m = { m }
57
58
onClick = { onClick }
58
59
rightIcon = { rightIcon }
60
+ role = { role }
59
61
size = { size }
60
62
touchDark
61
63
type = { type }
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ export interface propsTertiaryBtn {
37
37
onMouseEnter ?: ( e : React . MouseEvent < HTMLElement > ) => void
38
38
onMouseLeave ?: ( e : React . MouseEvent < HTMLElement > ) => void
39
39
rightIcon ?: boolean
40
+ role ?: 'button' | 'link'
40
41
type ?: 'button' | 'submit' | 'reset'
41
42
tabIndex ?: number
42
43
withoutColor ?: boolean
@@ -66,6 +67,7 @@ export function BtnTertiary({
66
67
onMouseEnter,
67
68
onMouseLeave,
68
69
rightIcon,
70
+ role = 'button' ,
69
71
type = 'button' ,
70
72
tabIndex,
71
73
withoutColor = false ,
@@ -104,7 +106,7 @@ export function BtnTertiary({
104
106
< Button
105
107
aria-label = { ariaLabel }
106
108
id = { id }
107
- role = "button"
109
+ role = { role }
108
110
type = { type }
109
111
tabIndex = { tabIndex }
110
112
background = "transparent"
You can’t perform that action at this time.
0 commit comments