From 94448fa278ab352a741ff13f22d6104869571144 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Wed, 18 Oct 2023 19:25:02 +0200 Subject: feat(components): add a generic Grid component * merge Columns, Gallery and CardsList into Grid component * add more options to control the grid --- src/components/organisms/layout/cards-list.tsx | 60 -------------------------- 1 file changed, 60 deletions(-) delete mode 100644 src/components/organisms/layout/cards-list.tsx (limited to 'src/components/organisms/layout/cards-list.tsx') diff --git a/src/components/organisms/layout/cards-list.tsx b/src/components/organisms/layout/cards-list.tsx deleted file mode 100644 index 4f920e8..0000000 --- a/src/components/organisms/layout/cards-list.tsx +++ /dev/null @@ -1,60 +0,0 @@ -import type { FC, ReactElement } from 'react'; -import { List, ListItem } from '../../atoms'; -import type { CardProps } from '../../molecules'; -import styles from './cards-list.module.scss'; - -export type CardsListItem = { - /** - * The card. - */ - card: ReactElement | CardProps>; - /** - * The card id. - */ - id: string; -}; - -export type CardsListProps = { - /** - * Set additional classnames to the list wrapper. - */ - className?: string; - /** - * Should the cards list be ordered? - * - * @default false - */ - isOrdered?: boolean; - /** - * The cards data. - */ - items: CardsListItem[]; -}; - -/** - * CardsList component - * - * Return a list of Card components. - */ -export const CardsList: FC = ({ - className = '', - isOrdered = false, - items, -}) => { - const kindModifier = `wrapper--${isOrdered ? 'ordered' : 'unordered'}`; - - return ( - - {items.map(({ id, card }) => ( - - {card} - - ))} - - ); -}; -- cgit v1.2.3