Icon Card #35
Reference in New Issue
Block a user
Delete Branch "adilallo/component/IconCard"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implement IconCard Component (CR-47)
Overview
This PR implements the IconCard component (CR-47) following the Figma design specifications. The IconCard is an interactive card component that displays an icon, title, and description, designed for showcasing different community rule categories (e.g., Worker's cooperatives). The component follows the container/presentation pattern, includes full accessibility support, keyboard navigation, and comprehensive test coverage.
Changes
New Component: IconCard
app/components/IconCard/with container/presentation patternTypography/Family 1, weight 400,Sizing/800(32px)measures/spacing/500(20px),space-betweenlayout for icon, title, and descriptionFiles Created:
app/components/IconCard/IconCard.container.tsx- Container logic with keyboard handlersapp/components/IconCard/IconCard.view.tsx- Presentational component with stylingapp/components/IconCard/IconCard.types.ts- TypeScript interfacesapp/components/IconCard/index.tsx- Component exporttests/components/IconCard.test.tsx- 10 unit tests covering rendering, accessibility, keyboard navigation, and propsstories/IconCard.stories.js- Storybook stories with multiple variantsFiles Modified:
app/components-preview/page.tsx- Added IconCard demo section with example usingVector_WorkerCoop.svgassetDesign Tokens Used:
--color-border-default-primary- Border color--color-content-default-primary- Text color (white)--color-content-default-brand-primary- Focus ring color--measures-spacing-020- Padding (20px)Assets:
@public/assets/Vector_WorkerCoop.svgas example icon (swappable viaiconprop)Screenshots
How to Test
npm run storybook