Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaced all the css into tailwind css on Card component #1762

Merged
merged 2 commits into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions components/Cards/Card/Card.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { bool, node, string } from 'prop-types';
import classNames from 'classnames';
import { getDataAttributes } from 'common/utils/prop-utils';
import styles from './Card.module.css';

Card.propTypes = {
children: node.isRequired,
Expand All @@ -19,7 +18,14 @@ function Card({ children, className, hasAnimationOnHover, ...props }) {

return (
<article
className={classNames(styles.Card, className, { [styles.animatedCard]: hasAnimationOnHover })}
className={classNames(
'items-center bg-white [&_svg]:fill-secondary text-secondary flex flex-col flex-nowrap justify-around m-4 min-h-[100px] min-w-[100px] p-6 shadow-md focus-visible:outline-none',
className,
{
'shadow-sm transition-shadow duration-200 ease-linear hover:shadow-lg focus-visible:shadow-lg':
hasAnimationOnHover,
},
)}
{...customDataAttributes}
>
{children}
Expand Down
31 changes: 0 additions & 31 deletions components/Cards/Card/Card.module.css

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

exports[`Card should render with many props assigned 1`] = `
<article
className="Card test-class animatedCard"
className="items-center bg-white [&_svg]:fill-secondary text-secondary flex flex-col flex-nowrap justify-around m-4 min-h-[100px] min-w-[100px] p-6 shadow-md focus-visible:outline-none test-class shadow-sm transition-shadow duration-200 ease-linear hover:shadow-lg focus-visible:shadow-lg"
>
Test
</article>
`;

exports[`Card should render with required props 1`] = `
<article
className="Card"
className="items-center bg-white [&_svg]:fill-secondary text-secondary flex flex-col flex-nowrap justify-around m-4 min-h-[100px] min-w-[100px] p-6 shadow-md focus-visible:outline-none"
>
Test
</article>
Expand Down