Skip to content

Commit

Permalink
feat: add hover effect in desktop view
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuuriii committed Nov 15, 2023
1 parent b85bafd commit 8d428bc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
12 changes: 8 additions & 4 deletions app/components/whatIs/card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,24 @@ interface CardProps {
export default function Card({ index, bgImg, title, btnText }: CardProps) {
return (
<div
className={`relative flex h-[15rem] w-[20rem] items-center justify-center mb-[1rem] sm:mr-[2rem] bg-women`}
className={`relative flex xl:bg-[#171B4180] h-[20rem] rounded-[1rem] overflow-hidden w-[29rem] items-center justify-center mb-[1rem] sm:mr-[2rem] bg-women`}
>
<div className='absolute h-[100%] w-[100%] z-[-1]'>
<div className='absolute hidden xl:block h-[100%] w-[100%] z-[-1]'>
<Image className='h-[100%] w-[100%]' src={bgImg} alt='' />
</div>
<div className='flex flex-col items-center justify-center'>
<h1
className='text-[#2F327D] lg:text-white mb-[0.2rem] font-[600]'
className='text-[#2F327D] xl:text-[1.2rem] lg:text-white mb-[0.2rem] font-[600]'
style={{ fontFamily: 'poppins, sans-serif' }}
>
{title}
</h1>
<button
className='h-[3rem] w-[12rem] rounded-[2rem] flex justify-center items-center bg-[#23BDEEE5] text-[#FFFFFF] font-[500] hover:scale-[1.03] duration-[0.3s] active:scale-[0.99] hover:bg-[#4acff7]'
className={`h-[3rem] w-[12rem] rounded-[2rem] flex justify-center items-center bg-[#23BDEEE5] text-[#FFFFFF] font-[500] hover:scale-[1.03] duration-[0.3s] active:scale-[0.99] hover:bg-[#4acff7] xl:text-[1rem] ${
index === 0
? 'xl:bg-transparent xl:border-[1px] border-solid border-[#fff] xl:hover:border-none'
: ''
}`}
style={{ fontFamily: 'poppins, sans-serif' }}
>
{btnText}
Expand Down
8 changes: 1 addition & 7 deletions tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,7 @@ const config: Config = {
'./components/**/*.{js,ts,jsx,tsx,mdx}',
'./app/**/*.{js,ts,jsx,tsx,mdx}',
],
theme: {
extend: {
backgroundImage: {
women: "url('/assets/whatIs/women.png')",
},
},
},
theme: {},
plugins: [],
};
export default config;

0 comments on commit 8d428bc

Please sign in to comment.