overload <blockquote> in <ReactMarkdown>
This commit is contained in:
1 parent
7d9f5a2c96
commit
6f43127ec2
1 file changed
+16
-1
+16
-1
@@ -75,9 +75,24 @@ function ProjectDetails({project}) {
|
|||||||
<ReactMarkdown
|
<ReactMarkdown
|
||||||
remarkPlugins={[remarkGfm]}
|
remarkPlugins={[remarkGfm]}
|
||||||
components={{
|
components={{
|
||||||
h2({node, ...props}) {
|
h2({ node, ...props }) {
|
||||||
const id = String(props.children).toLowerCase().replace(/\s+/g, "-");
|
const id = String(props.children).toLowerCase().replace(/\s+/g, "-");
|
||||||
return <h2 id={id} {...props} />;
|
return <h2 id={id} {...props} />;
|
||||||
|
},
|
||||||
|
blockquote({ node, ...props }) {
|
||||||
|
return (
|
||||||
|
<blockquote
|
||||||
|
style={{
|
||||||
|
margin: '16px 0',
|
||||||
|
padding: '12px 16px',
|
||||||
|
backgroundColor: '#161616',
|
||||||
|
borderLeft: '3px solid #e05a36',
|
||||||
|
borderRadius: '0 6px 6px 0',
|
||||||
|
fontSize: '0.85rem',
|
||||||
|
}}
|
||||||
|
{...props}
|
||||||
|
/>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in new issue
Block a user