Skip to content

Commit 6702a21

Browse files
Fix button hover transition
1 parent 1ed1e7a commit 6702a21

3 files changed

Lines changed: 14 additions & 23 deletions

File tree

src/components/ContactButton/styles.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import styled from 'styled-components';
44
const poppins = Poppins({ weight: ['600'], style: ['normal'], subsets: ['latin'], display: 'swap' });
55

66
export const ContactButton = styled.button`
7-
display: flex;
7+
display: flex;
88
width: fit-content;
99
height: 3.25rem;
1010
padding: 1.5625rem 1.5rem;
@@ -14,7 +14,7 @@ display: flex;
1414
border-radius: 0.5rem;
1515
font-size: 1rem;
1616
border: none;
17-
background: ${({ theme }) => theme.gradients.CTA};
17+
background: ${({ theme }) => theme.colors.mainGreen};
1818
box-shadow: ${({ theme }) =>
1919
`0px 0px 8px 0px ${theme.colors.shadows.mainGreen}, 0px 0px 1.9px 0px ${theme.colors.shadows.white}`};
2020
cursor: pointer;
@@ -23,16 +23,17 @@ display: flex;
2323
font-family: ${poppins.style.fontFamily};
2424
2525
&:hover {
26-
background: ${({ theme }) => theme.gradients.secondary};
26+
background: ${({ theme }) => theme.colors.hover.mainGreen};
27+
transition: 0.3s;
2728
}
2829
29-
@media (max-width: 1200px) {
30+
@media (max-width: 1200px) {
3031
font-size: 0.9rem;
3132
height: 2.5rem;
3233
padding: 1rem 1.25rem;
3334
}
3435
35-
@media (max-width: 500px) {
36+
@media (max-width: 500px) {
3637
font-size: 0.5rem;
3738
height: 2.25rem;
3839
padding: 0.45rem 1rem;

src/components/Navbar/navbar.tsx

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,11 @@ export const Navbar = () => {
2121
src={lecodeLogo}
2222
/>
2323
<TranslateButtonContainer>
24-
<ContactButton
25-
type='button'
26-
>
27-
<Link
28-
href='#contact'
29-
>
24+
<Link href='#contact'>
25+
<ContactButton type='button'>
3026
{t('contactUs.button')}
31-
</Link>
32-
33-
</ContactButton>
27+
</ContactButton>
28+
</Link>
3429
<Language />
3530
</TranslateButtonContainer>
3631
</NavbarContentContainer>

src/components/NavbarMobile/header-mobile.tsx

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import { ContactButton } from '@/components/ContactButton';
66
import lecodeLogo from '../../../public/lecode-logo.svg';
77
import { InternalLinks } from '../InternalLinks';
88
import { Language } from '../Language';
9-
import { NavbarContainer, NavbarContentContainer,ContactTraslate } from './styles';
10-
9+
import { NavbarContainer, NavbarContentContainer, ContactTraslate } from './styles';
1110

1211
export const HeaderMobile = () => {
1312
const { t } = useTranslation();
@@ -20,14 +19,10 @@ export const HeaderMobile = () => {
2019
src={lecodeLogo}
2120
/>
2221
<ContactTraslate>
23-
<ContactButton type='button'>
24-
<Link
25-
href='#contact'
26-
>
27-
{t('contactUs.button')}
22+
<Link href='#contact'>
23+
<ContactButton type='button'>{t('contactUs.button')}</ContactButton>
2824
</Link>
29-
</ContactButton>
30-
<Language />
25+
<Language />
3126
</ContactTraslate>
3227
</NavbarContentContainer>
3328
</NavbarContainer>

0 commit comments

Comments
 (0)