diff options
| author | Armand Philippot <git@armandphilippot.com> | 2023-09-26 18:43:11 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2023-10-24 12:25:00 +0200 |
| commit | 388e687857345c85ee550cd5da472675e05a6ff5 (patch) | |
| tree | 0f035a3cad57a75959c028949a57227a83d480e2 /src/pages/index.tsx | |
| parent | 70efcfeaa0603415dd992cb662d8efb960e6e49a (diff) | |
refactor(components): rewrite Button and ButtonLink components
Both:
* move styles to Sass placeholders
Button:
* add `isPressed` prop to Button
* add `isLoading` prop to Button (to differentiate state from
disabled)
ButtonLink:
* replace `external` prop with `isExternal` prop
* replace `href` prop with `to` prop
Diffstat (limited to 'src/pages/index.tsx')
| -rw-r--r-- | src/pages/index.tsx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 9cecfcf..816e44e 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -40,7 +40,7 @@ const CodingLinks: FC = () => { { id: 'web-development', value: ( - <ButtonLink target={ROUTES.THEMATICS.WEB_DEV}> + <ButtonLink to={ROUTES.THEMATICS.WEB_DEV}> {intl.formatMessage({ defaultMessage: 'Web development', description: 'HomePage: link to web development thematic', @@ -52,7 +52,7 @@ const CodingLinks: FC = () => { { id: 'projects', value: ( - <ButtonLink target={ROUTES.PROJECTS}> + <ButtonLink to={ROUTES.PROJECTS}> {intl.formatMessage({ defaultMessage: 'Projects', description: 'HomePage: link to projects', @@ -82,7 +82,7 @@ const ColdarkRepos: FC = () => { { id: 'coldark-github', value: ( - <ButtonLink target={repo.github} external={true}> + <ButtonLink isExternal to={repo.github}> {intl.formatMessage({ defaultMessage: 'Github', description: 'HomePage: Github link', @@ -94,7 +94,7 @@ const ColdarkRepos: FC = () => { { id: 'coldark-gitlab', value: ( - <ButtonLink target={repo.gitlab} external={true}> + <ButtonLink isExternal to={repo.gitlab}> {intl.formatMessage({ defaultMessage: 'Gitlab', description: 'HomePage: Gitlab link', @@ -120,7 +120,7 @@ const LibreLinks: FC = () => { { id: 'free', value: ( - <ButtonLink target={ROUTES.THEMATICS.FREE}> + <ButtonLink to={ROUTES.THEMATICS.FREE}> {intl.formatMessage({ defaultMessage: 'Free', description: 'HomePage: link to free thematic', @@ -132,7 +132,7 @@ const LibreLinks: FC = () => { { id: 'linux', value: ( - <ButtonLink target={ROUTES.THEMATICS.LINUX}> + <ButtonLink to={ROUTES.THEMATICS.LINUX}> {intl.formatMessage({ defaultMessage: 'Linux', description: 'HomePage: link to Linux thematic', @@ -159,7 +159,7 @@ const ShaarliLink: FC = () => { { id: 'shaarli', value: ( - <ButtonLink target={shaarliUrl}> + <ButtonLink isExternal to={shaarliUrl}> {intl.formatMessage({ defaultMessage: 'Shaarli', description: 'HomePage: link to Shaarli', @@ -186,7 +186,7 @@ const MoreLinks: FC = () => { { id: 'contact-me', value: ( - <ButtonLink target={ROUTES.CONTACT}> + <ButtonLink to={ROUTES.CONTACT}> <Envelop aria-hidden={true} className={styles.icon} /> {intl.formatMessage({ defaultMessage: 'Contact me', @@ -199,7 +199,7 @@ const MoreLinks: FC = () => { { id: 'rss-feed', value: ( - <ButtonLink target={ROUTES.RSS}> + <ButtonLink to={ROUTES.RSS}> <FeedIcon aria-hidden={true} className={feedIconClass} /> {intl.formatMessage({ defaultMessage: 'Subscribe', |
