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

recloned and added code #30

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

Laiba-Nasir
Copy link
Collaborator

I created the card component and tried to closely match the design in the issue. The text is dynamic, making the component reusable for multiple purposes.
Please review the implementation and let me know if there are any changes or improvements you'd like to see!
Attached is my output and the expected output:
image
image
fixes #11

@Laiba-Nasir Laiba-Nasir self-assigned this Jan 15, 2025
@aviamb aviamb added the ready for review Issue Finished label Jan 15, 2025
@Kevinloritsch
Copy link
Contributor

Looking good for now! There are 1-2 things to fix (which we haven't covered yet), and will be one of the topics of our next meeting!

@Laiba-Nasir
Copy link
Collaborator Author

image
Made the code more dynamic and fit the project requirements of ensuring the size is more dynamic - I tried to make the size more dynamic wherever it was possible. Also started using the custom colors and fonts in the tailwind.config.css file.
I’m having a bit of trouble with the shadow element, I experimented with that, but I wasn’t able to get 100% match as what the picture was, but there is a light shadow. I plan on discussing it with one of the leads in this weeks meeting

Copy link
Contributor

@qhgill qhgill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for getting the changes in! I left a few comments on changes to match with our code quality standards and to give you some help with the box shadow you mentioned. Great progress though!


return (
<div className={containerClasses}>
<h2 className={titleClasses}>{title}</h2>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use div instead of h2

"text-3xl text-leap-dark-green mb-6 text-center font-bold tracking-widest";

const boxClasses =
"bg-leap-mid-green p-6 shadow-[0_4px_6px_rgba(0.9,1.9,0.9,1.9)] max-w-[300px] text-center text-white text-base leading-relaxed relative tracking-widest";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

look at this component for how to use tailwind box shadow: https://github.com/acm-ucr/leap-website/blob/dev/src/components/home/Value_Box.tsx
don't use max-w, or leading(regular w- is fine), text-base is also active by default so no need to have this part

const containerClasses = "flex flex-col items-center my-8";

const titleClasses =
"text-3xl text-leap-dark-green mb-6 text-center font-bold tracking-widest";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tracking is unnecessary here


const ValueCard: React.FC<ValueCardProps> = ({ title, text }) => {
// Assign class names to variables for readability and maintainability
const containerClasses = "flex flex-col items-center my-8";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move these from being declared separately to being inline to be consistent with other components.

@Laiba-Nasir
Copy link
Collaborator Author

Hello, I have pushed some new fixes for addressing the shadow, inline elements, and removing tracking when necessary. Please let me know what you think. this is how the output looks now:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review Issue Finished
Projects
None yet
Development

Successfully merging this pull request may close these issues.

About Page - Values Component
4 participants