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 {
1919 isLoading ?: boolean
2020 onClick ?: ( e : React . MouseEvent < HTMLElement > ) => void
2121 rightIcon ?: React . ReactElement
22+ role ?: 'button' | 'link'
2223 size ?: 'regular' | 'small'
2324 type ?: 'button' | 'submit' | 'reset'
2425 tabIndex ?: number
@@ -57,6 +58,7 @@ export function Btn({
5758 m = '0' ,
5859 onClick,
5960 rightIcon,
61+ role = 'button' ,
6062 rounded = false ,
6163 size = 'regular' ,
6264 touchDark = false ,
@@ -88,7 +90,7 @@ export function Btn({
8890 < Button
8991 aria-label = { ariaLabel }
9092 id = { id }
91- role = "button"
93+ role = { role }
9294 bg = { colorMain }
9395 borderRadius = { borderRadius }
9496 color = { color }
Original file line number Diff line number Diff line change @@ -10,19 +10,21 @@ export interface props {
1010 id ?: string
1111 m ?: string
1212 onClick ?: ( e : React . MouseEvent < HTMLElement > ) => void
13+ role ?: 'button' | 'link'
1314 tabIndex ?: number
1415 textDecorationLine ?: boolean
1516}
1617
1718export function BtnLink ( {
18- as = 'button ' ,
19+ as = 'a ' ,
1920 ariaLabel,
2021 children,
2122 fontSize = '0.875rem' ,
2223 href = '' ,
2324 id,
2425 m = '0' ,
2526 onClick,
27+ role = 'link' ,
2628 tabIndex,
2729 textDecorationLine = true ,
2830} : props ) : JSX . Element {
@@ -41,7 +43,7 @@ export function BtnLink({
4143 as = { as }
4244 aria-label = { ariaLabel }
4345 id = { id }
44- role = "button"
46+ role = { role }
4547 backgroundColor = "transparent"
4648 borderStyle = "none"
4749 className = "linkButton"
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ export function BtnPrimary({
3232 isLoading = false ,
3333 onClick,
3434 rightIcon,
35+ role = 'button' ,
3536 size = 'regular' ,
3637 type = 'button' ,
3738 tabIndex,
@@ -48,6 +49,7 @@ export function BtnPrimary({
4849 m = { m }
4950 onClick = { onClick }
5051 rightIcon = { rightIcon }
52+ role = { role }
5153 size = { size }
5254 type = { type }
5355 tabIndex = { tabIndex }
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ export function BtnSecondary({
3333 isLoading = false ,
3434 onClick,
3535 rightIcon,
36+ role = 'button' ,
3637 size = 'regular' ,
3738 type = 'button' ,
3839 tabIndex,
@@ -56,6 +57,7 @@ export function BtnSecondary({
5657 m = { m }
5758 onClick = { onClick }
5859 rightIcon = { rightIcon }
60+ role = { role }
5961 size = { size }
6062 touchDark
6163 type = { type }
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ export interface propsTertiaryBtn {
3737 onMouseEnter ?: ( e : React . MouseEvent < HTMLElement > ) => void
3838 onMouseLeave ?: ( e : React . MouseEvent < HTMLElement > ) => void
3939 rightIcon ?: boolean
40+ role ?: 'button' | 'link'
4041 type ?: 'button' | 'submit' | 'reset'
4142 tabIndex ?: number
4243 withoutColor ?: boolean
@@ -66,6 +67,7 @@ export function BtnTertiary({
6667 onMouseEnter,
6768 onMouseLeave,
6869 rightIcon,
70+ role = 'button' ,
6971 type = 'button' ,
7072 tabIndex,
7173 withoutColor = false ,
@@ -104,7 +106,7 @@ export function BtnTertiary({
104106 < Button
105107 aria-label = { ariaLabel }
106108 id = { id }
107- role = "button"
109+ role = { role }
108110 type = { type }
109111 tabIndex = { tabIndex }
110112 background = "transparent"
You can’t perform that action at this time.
0 commit comments