aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/templates/page
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2023-09-26 18:43:11 +0200
committerArmand Philippot <git@armandphilippot.com>2023-10-24 12:25:00 +0200
commit388e687857345c85ee550cd5da472675e05a6ff5 (patch)
tree0f035a3cad57a75959c028949a57227a83d480e2 /src/components/templates/page
parent70efcfeaa0603415dd992cb662d8efb960e6e49a (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/components/templates/page')
-rw-r--r--src/components/templates/page/page-layout.stories.tsx20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/components/templates/page/page-layout.stories.tsx b/src/components/templates/page/page-layout.stories.tsx
index 146204e..68df415 100644
--- a/src/components/templates/page/page-layout.stories.tsx
+++ b/src/components/templates/page/page-layout.stories.tsx
@@ -1,4 +1,4 @@
-import { ComponentMeta, ComponentStory } from '@storybook/react';
+import type { ComponentMeta, ComponentStory } from '@storybook/react';
import { ButtonLink, Heading, Link } from '../../atoms';
import { LinksListWidget, PostsList, Sharing } from '../../organisms';
import { comments } from '../../organisms/layout/comments-list.fixture';
@@ -287,7 +287,7 @@ Post.args = {
footerMeta: {
custom: {
label: 'Read more about:',
- value: <ButtonLink target="#">Topic 1</ButtonLink>,
+ value: <ButtonLink to="#">Topic 1</ButtonLink>,
},
},
children: (
@@ -335,7 +335,7 @@ Post.args = {
/>,
],
withToC: true,
- comments: comments,
+ comments,
allowComments: true,
};
@@ -363,14 +363,12 @@ Blog.args = {
title: 'Blog',
headerMeta: { total: posts.length },
children: (
- <>
- <PostsList
- posts={posts}
- byYear={true}
- total={posts.length}
- searchPage="#"
- />
- </>
+ <PostsList
+ posts={posts}
+ byYear={true}
+ total={posts.length}
+ searchPage="#"
+ />
),
widgets: [
<LinksListWidget