diff options
| author | Armand Philippot <git@armandphilippot.com> | 2023-09-28 18:03:43 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2023-10-24 12:25:00 +0200 |
| commit | 837e0e904c40f7b87561c34ca3f49edd5d8d1c52 (patch) | |
| tree | 37835dd2c84ed770b5719152aab0b74d93c0878c /src/pages/index.tsx | |
| parent | d17d894f398650209c0ddd29502308de8c07bd93 (diff) | |
feat(components): replace icons with a generic Icon component
Sizes are also predefined and can be set using the `size` prop,
so the consumers should no longer adjust the size in CSS.
Diffstat (limited to 'src/pages/index.tsx')
| -rw-r--r-- | src/pages/index.tsx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/pages/index.tsx b/src/pages/index.tsx index d99462f..662ae81 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -4,7 +4,6 @@ import Head from 'next/head'; import Script from 'next/script'; import type { FC, HTMLAttributes } from 'react'; import { useIntl } from 'react-intl'; -import FeedIcon from '../assets/images/icon-feed.svg'; import { ButtonLink, CardsList, @@ -12,8 +11,8 @@ import { Column, Columns, type ColumnsProps, - Envelop, getLayout, + Icon, List, type ListItem, ResponsiveImage, @@ -236,13 +235,12 @@ const ShaarliLink: FC = () => { */ const MoreLinks: FC = () => { const intl = useIntl(); - const feedIconClass = `${styles.icon} ${styles['icon--feed']}`; const links: ListItem[] = [ { id: 'contact-me', value: ( <ButtonLink to={ROUTES.CONTACT}> - <Envelop aria-hidden={true} className={styles.icon} /> + <Icon aria-hidden={true} shape="envelop" /> {intl.formatMessage({ defaultMessage: 'Contact me', description: 'HomePage: contact button text', @@ -255,7 +253,7 @@ const MoreLinks: FC = () => { id: 'rss-feed', value: ( <ButtonLink to={ROUTES.RSS}> - <FeedIcon aria-hidden={true} className={feedIconClass} /> + <Icon aria-hidden={true} shape="feed" /> {intl.formatMessage({ defaultMessage: 'Subscribe', description: 'HomePage: RSS feed subscription text', |
