Skip to content

Commit f5b5d9e

Browse files
feat(molecules): agregamos eventos de mouse a boton terciario (#613)
1 parent 07b8200 commit f5b5d9e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/molecules/Buttons/BtnTertiary.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ export interface propsTertiaryBtn {
3636
id?: string
3737
activeWhenPress?: boolean
3838
onClick?: (e: React.MouseEvent<HTMLElement>) => void
39+
onMouseEnter?: (e: React.MouseEvent<HTMLElement>) => void
40+
onMouseLeave?: (e: React.MouseEvent<HTMLElement>) => void
3941
}
4042

4143
export function BtnTertiary({
@@ -50,6 +52,8 @@ export function BtnTertiary({
5052
id,
5153
activeWhenPress = false,
5254
onClick,
55+
onMouseEnter,
56+
onMouseLeave,
5357
}: propsTertiaryBtn): JSX.Element {
5458
const gray = vars('colors-neutral-gray')
5559
const blue = vars('colors-main-deepSkyBlue')
@@ -100,14 +104,16 @@ export function BtnTertiary({
100104
leftIcon={lIcon}
101105
m={m}
102106
onClick={onClick}
107+
onMouseEnter={onMouseEnter}
108+
onMouseLeave={onMouseLeave}
103109
_hover={{
104110
color: `${blue}`,
105111
}}
106112
_focusVisible={{
107113
boxShadow: `inset 0 0 0 2px ${blue}, inset 0 0 0 4px ${white}`,
108114
}}
109115
_focus={{
110-
color: activeWhenPress ? `${blue}` : 'inherit',
116+
color: activeWhenPress ? `${blue} !important` : 'inherit',
111117
boxShadow: 'none',
112118
}}
113119
_active={{

0 commit comments

Comments
 (0)