mirror of
https://github.com/PretendoNetwork/website.git
synced 2026-08-23 09:07:40 -05:00
feat(component): create caption component
This commit is contained in:
13
components/Caption/Caption.js
Normal file
13
components/Caption/Caption.js
Normal 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>
|
||||
);
|
||||
}
|
||||
5
components/Caption/Caption.module.css
Normal file
5
components/Caption/Caption.module.css
Normal file
@@ -0,0 +1,5 @@
|
||||
.caption {
|
||||
width: 75%;
|
||||
margin: .5rem 0;
|
||||
line-height: 1.75;
|
||||
}
|
||||
Reference in New Issue
Block a user