Skip to content

Commit

Permalink
fix(PDYE-849): role botones (#636)
Browse files Browse the repository at this point in the history
Co-authored-by: Javiera Munita <javieramunita@MacBook-Air-de-Javiera.local>
  • Loading branch information
JaviMunita and Javiera Munita committed Jul 24, 2024
1 parent 3d45806 commit 8d055e1
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/molecules/Buttons/Btn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export interface propsBaseBtns {
isLoading?: boolean
onClick?: (e: React.MouseEvent<HTMLElement>) => void
rightIcon?: React.ReactElement
role?: 'button' | 'link'
size?: 'regular' | 'small'
type?: 'button' | 'submit' | 'reset'
tabIndex?: number
Expand Down Expand Up @@ -57,6 +58,7 @@ export function Btn({
m = '0',
onClick,
rightIcon,
role = 'button',
rounded = false,
size = 'regular',
touchDark = false,
Expand Down Expand Up @@ -88,7 +90,7 @@ export function Btn({
<Button
aria-label={ariaLabel}
id={id}
role="button"
role={role}
bg={colorMain}
borderRadius={borderRadius}
color={color}
Expand Down
6 changes: 4 additions & 2 deletions src/molecules/Buttons/BtnLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,21 @@ export interface props {
id?: string
m?: string
onClick?: (e: React.MouseEvent<HTMLElement>) => void
role?: 'button' | 'link'
tabIndex?: number
textDecorationLine?: boolean
}

export function BtnLink({
as = 'button',
as = 'a',
ariaLabel,
children,
fontSize = '0.875rem',
href = '',
id,
m = '0',
onClick,
role = 'link',
tabIndex,
textDecorationLine = true,
}: props): JSX.Element {
Expand All @@ -41,7 +43,7 @@ export function BtnLink({
as={as}
aria-label={ariaLabel}
id={id}
role="button"
role={role}
backgroundColor="transparent"
borderStyle="none"
className="linkButton"
Expand Down
2 changes: 2 additions & 0 deletions src/molecules/Buttons/BtnPrimary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export function BtnPrimary({
isLoading = false,
onClick,
rightIcon,
role = 'button',
size = 'regular',
type = 'button',
tabIndex,
Expand All @@ -48,6 +49,7 @@ export function BtnPrimary({
m={m}
onClick={onClick}
rightIcon={rightIcon}
role={role}
size={size}
type={type}
tabIndex={tabIndex}
Expand Down
2 changes: 2 additions & 0 deletions src/molecules/Buttons/BtnSecondary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export function BtnSecondary({
isLoading = false,
onClick,
rightIcon,
role = 'button',
size = 'regular',
type = 'button',
tabIndex,
Expand All @@ -56,6 +57,7 @@ export function BtnSecondary({
m={m}
onClick={onClick}
rightIcon={rightIcon}
role={role}
size={size}
touchDark
type={type}
Expand Down
4 changes: 3 additions & 1 deletion src/molecules/Buttons/BtnTertiary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export interface propsTertiaryBtn {
onMouseEnter?: (e: React.MouseEvent<HTMLElement>) => void
onMouseLeave?: (e: React.MouseEvent<HTMLElement>) => void
rightIcon?: boolean
role?: 'button' | 'link'
type?: 'button' | 'submit' | 'reset'
tabIndex?: number
withoutColor?: boolean
Expand Down Expand Up @@ -66,6 +67,7 @@ export function BtnTertiary({
onMouseEnter,
onMouseLeave,
rightIcon,
role = 'button',
type = 'button',
tabIndex,
withoutColor = false,
Expand Down Expand Up @@ -104,7 +106,7 @@ export function BtnTertiary({
<Button
aria-label={ariaLabel}
id={id}
role="button"
role={role}
type={type}
tabIndex={tabIndex}
background="transparent"
Expand Down

0 comments on commit 8d055e1

Please sign in to comment.