diff options
| author | Armand Philippot <git@armandphilippot.com> | 2023-10-20 17:01:37 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2023-11-11 18:14:41 +0100 |
| commit | 9492414d4ae94045eff4e06f636529bc0e71cb06 (patch) | |
| tree | 7f268e6b62ee89128abd0581301265dc64f147d5 /src/components/atoms/layout/copyright.tsx | |
| parent | c6f6f8f895e68f2d85ca681997ef613d982bac14 (diff) | |
refactor(components): rewrite Copyright component
* remove `icon` prop (it is confusing because a copyright should have
the copyright symbol, the license is not part of the copyright)
* reorganize copyright informations
I also updated the CC BY SA icon because the elements was in the wrong
order.
Diffstat (limited to 'src/components/atoms/layout/copyright.tsx')
| -rw-r--r-- | src/components/atoms/layout/copyright.tsx | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/src/components/atoms/layout/copyright.tsx b/src/components/atoms/layout/copyright.tsx deleted file mode 100644 index 3d56059..0000000 --- a/src/components/atoms/layout/copyright.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import type { FC, ReactNode } from 'react'; -import styles from './copyright.module.scss'; -import { Time } from './time'; - -export type CopyrightDates = { - /** - * The copyright start year. - */ - start: string; - /** - * The copyright end year. - */ - end?: string; -}; - -export type CopyrightProps = { - /** - * The copyright owner. - */ - owner: string; - /** - * The copyright dates. - */ - dates: CopyrightDates; - /** - * The copyright icon. - */ - icon: ReactNode; -}; - -/** - * Copyright component - * - * Renders a copyright information (owner, dates, license icon). - */ -export const Copyright: FC<CopyrightProps> = ({ owner, dates, icon }) => ( - <div className={styles.wrapper}> - <span className={styles.owner}>{owner}</span> - {icon} - <Time date={dates.start} hideDay hideMonth /> - {dates.end ? ( - <> - <span>-</span> - <Time date={dates.end} hideDay hideMonth /> - </> - ) : ( - '' - )} - </div> -); |
