From 07b1d087909ac5b4f33169206fbabccb36f1a519 Mon Sep 17 00:00:00 2001 From: Ash Monty Date: Sat, 1 Apr 2023 00:09:48 +0200 Subject: [PATCH] feat(component): create caption component --- components/Caption/Caption.js | 13 +++++++++++++ components/Caption/Caption.module.css | 5 +++++ 2 files changed, 18 insertions(+) create mode 100644 components/Caption/Caption.js create mode 100644 components/Caption/Caption.module.css diff --git a/components/Caption/Caption.js b/components/Caption/Caption.js new file mode 100644 index 0000000..2b66ce9 --- /dev/null +++ b/components/Caption/Caption.js @@ -0,0 +1,13 @@ +import styles from './Caption.module.css'; + +/** + * A reusable component for captions. + */ + +export default function Caption(ctx) { + const { children: caption, style, id } = ctx; + + return ( +

{caption}

+ ); +} diff --git a/components/Caption/Caption.module.css b/components/Caption/Caption.module.css new file mode 100644 index 0000000..4bb9a54 --- /dev/null +++ b/components/Caption/Caption.module.css @@ -0,0 +1,5 @@ +.caption { + width: 75%; + margin: .5rem 0; + line-height: 1.75; +}