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

[Frontend] StatsCard Component #4

Closed
wkim10 opened this issue Oct 11, 2024 · 0 comments · Fixed by #10
Closed

[Frontend] StatsCard Component #4

wkim10 opened this issue Oct 11, 2024 · 0 comments · Fixed by #10

Comments

@wkim10
Copy link
Collaborator

wkim10 commented Oct 11, 2024

Description

As you can see on the Figma, our goated designer An made a dashboard for the web app. One of the most important things that we have to do when building our frontend is to make components. These will increase modularity and so will allow us to reuse them throughout the app without having to rewrite the same code. You can see an example of a component we made in src/components/ExampleButton.tsx.

The component that we are tasking you with making is one for the “StatsCard” component at the top of the dashboard (ignore the other card component under “Upcoming events” for now, that’ll be a future ticket 👀). You can see that each of the cards have pretty much the same layout, with the only differences being the stat, icon, date, and title. This makes it a perfect example of turning something into a component.

Throughout it all, you’ll get more and more familiar with using the Tailwind and Iconify libraries. Tailwind will be used for general styling (CSS) and you can use Iconify for icons. You should definitely reference the Tailwind documentation, and you can look for icons on Iconify using the following link: https://icon-sets.iconify.design/

Screen Shot 2024-10-10 at 7 58 16 PM

Testing

Honestly, not too much to test here. You can test your component by placing it in src/app/private/admin/home/page.tsx or src/app/private/volunteer/home/page.tsx. We recommend you try putting in various numbers, dates, icons and anything else you can think of into the component to handle possible edge cases.

Once you’re done with that, feel free to make a PR (Pull Request).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants