feat(component): create caption component

This commit is contained in:
Ash Monty
2023-04-01 00:09:48 +02:00
parent 4c10b048b9
commit 07b1d08790
2 changed files with 18 additions and 0 deletions

View File

@@ -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 (
<p className={`${styles.caption} ${style}`} id={id}>{caption}</p>
);
}

View File

@@ -0,0 +1,5 @@
.caption {
width: 75%;
margin: .5rem 0;
line-height: 1.75;
}