Skip to content

Commit

Permalink
refactor: use classnames package to add styles to the text container
Browse files Browse the repository at this point in the history
  • Loading branch information
alain-kubwayo committed Mar 1, 2023
1 parent f476a13 commit 9f881a4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion components/cards/WhatWeDoCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,14 @@ const WhatWeDoCard = ({ index, title, description, image, alt }) => {
'md:order-2': index % 2 === 0
});

const textContainerStyles = classNames('md:w-3/4 lg:w-153.5 xl:w-141.25 space-y-4 self-center order-2', {
'md:order-1': index % 2 === 0,
'md:order-2': index % 2 !== 0
});

return (
<div className='flex flex-col gap-8 py-8 overflow-x-hidden md:flex md:flex-row md:justify-between md:grid-cols-2 md:py-0 md:mb-45'>
<div className={`md:w-3/4 lg:w-153.5 xl:w-141.25 space-y-4 self-center order-2 ${index % 2 !== 0 ? 'md:order-2' : 'md:order-1'}`}>
<div className={textContainerStyles}>
<Heading className="text-white xl:w-141.25" type="three">{title}</Heading>
<Paragraph>{description}</Paragraph>
</div>
Expand Down

0 comments on commit 9f881a4

Please sign in to comment.