aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/templates
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2023-10-02 18:07:34 +0200
committerArmand Philippot <git@armandphilippot.com>2023-11-11 18:14:41 +0100
commitb52b8183ce299b5a2d3c3b2f4f8cb94bb443d746 (patch)
tree2ec276a4ebd5d39b891ff8fe8d8bf45c478fb97e /src/components/templates
parent6221fa82e41915702d8139cade5c25e9d61e619f (diff)
refactor(components): rewrite Notice component
* Rename message prop to children prop and set ReactNode as type
Diffstat (limited to 'src/components/templates')
-rw-r--r--src/components/templates/page/page-layout.tsx16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/components/templates/page/page-layout.tsx b/src/components/templates/page/page-layout.tsx
index dfd9353..ee3fd3a 100644
--- a/src/components/templates/page/page-layout.tsx
+++ b/src/components/templates/page/page-layout.tsx
@@ -281,11 +281,9 @@ export const PageLayout: FC<PageLayoutProps> = ({
depth={2}
Notice={
commentStatus?.isReply ? (
- <Notice
- className={styles.notice}
- kind={commentStatus.kind}
- message={commentStatus.message}
- />
+ <Notice className={styles.notice} kind={commentStatus.kind}>
+ {commentStatus.message}
+ </Notice>
) : null
}
saveComment={saveComment}
@@ -307,11 +305,9 @@ export const PageLayout: FC<PageLayoutProps> = ({
title={commentFormTitle}
Notice={
commentStatus && !commentStatus.isReply ? (
- <Notice
- className={styles.notice}
- kind={commentStatus.kind}
- message={commentStatus.message}
- />
+ <Notice className={styles.notice} kind={commentStatus.kind}>
+ {commentStatus.message}
+ </Notice>
) : null
}
/>