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

4 frontend statscard component #10

Merged
merged 7 commits into from
Oct 28, 2024
Merged

Conversation

jpizzzel
Copy link
Collaborator

Description

Created the statscard which has 4 variables, a title, a number value, a date and an icon.

Issues

#4

Screenshots

Screenshot 2024-10-25 143246
The user won't be doing any tasks with the card besides reading it

Test

Compare to figma using npm run dev

Possible Downsides

The sizing may not be perfect compared to the figma but we tried to make it as close as possible. It is a bit difficult to tell when the fonts are not the same yet.

Additional Documentations

For icons: https://iconify.design/

@jpizzzel jpizzzel linked an issue Oct 25, 2024 that may be closed by this pull request
@johnny-t06 johnny-t06 self-requested a review October 27, 2024 00:59

const StatsCard = ({ heading, value, icon, date }: StatsCardProps) => {
return (
<div className="w-[360px] h-[160px] h-40 px-6 py-4 bg-white rounded-lg shadow border border-[#e4e7ec] flex-col justify-start items-start gap-4 inline-flex">
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: h-[160px] and h-40 do the same thing so you can remove one

Copy link
Collaborator

@wkim10 wkim10 left a comment

Choose a reason for hiding this comment

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

Looks good guys great work! I left one small comment but after that feel free to merge with main

src/app/page.tsx Outdated

export default function Home() {
return (
<div className="flex items-center justify-center h-screen">
{/* Example Button (ExampleButton.tsx in components folder) */}
<ExampleButton buttonText="Add User" />
<StatsCard
Copy link
Collaborator

Choose a reason for hiding this comment

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

Also I forgot but can you remove the components from this file before you merge?

@jpizzzel jpizzzel merged commit 4247f14 into main Oct 28, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Frontend] StatsCard Component
2 participants