diff options
| author | Armand Philippot <git@armandphilippot.com> | 2023-11-10 12:16:59 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2023-11-11 18:15:27 +0100 |
| commit | d7bcd93efcd4f1ae20678d0efa6777cfadc09a4e (patch) | |
| tree | 714edfa84a8f3c53262c407ac9a2a79c9d2479b8 /src/components/organisms/layout/overview.tsx | |
| parent | f699802b837d7d9fcf150ff2bf00cd3c5475c87a (diff) | |
refactor(components): replace Overview with ProjectOverview component
* `cover` prop is now expecting a ReactElement (NextImage)
* `meta` prop is now limited to a specific set of meta items
* add a `name` prop to add an accessible name to the figure element
Diffstat (limited to 'src/components/organisms/layout/overview.tsx')
| -rw-r--r-- | src/components/organisms/layout/overview.tsx | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/src/components/organisms/layout/overview.tsx b/src/components/organisms/layout/overview.tsx deleted file mode 100644 index ede2627..0000000 --- a/src/components/organisms/layout/overview.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import NextImage, { type ImageProps as NextImageProps } from 'next/image'; -import type { FC } from 'react'; -import { Figure } from '../../atoms'; -import { MetaList, type MetaItemData } from '../../molecules'; -import styles from './overview.module.scss'; - -export type OverviewProps = { - /** - * Set additional classnames to the overview wrapper. - */ - className?: string; - /** - * The overview cover. - */ - cover?: Pick<NextImageProps, 'alt' | 'src' | 'width' | 'height'>; - /** - * The overview meta. - */ - meta: MetaItemData[]; -}; - -/** - * Overview component - * - * Render an overview. - */ -export const Overview: FC<OverviewProps> = ({ - className = '', - cover, - meta, -}) => { - const wrapperClass = `${styles.wrapper} ${className}`; - - return ( - <div className={wrapperClass}> - {cover ? ( - <Figure> - <NextImage {...cover} className={styles.cover} /> - </Figure> - ) : null} - <MetaList className={styles.meta} hasInlinedValues items={meta} /> - </div> - ); -}; |
