Add <Heading> component

[MAILPOET-2770]
This commit is contained in:
Ján Mikláš
2020-04-30 14:56:50 +02:00
committed by Veljko V
parent 30ba93ca2e
commit e8be186fea

View File

@@ -0,0 +1,19 @@
import React from 'react';
type Props = {
children: React.ReactNode,
level: 1 | 2 | 3 | 4 | 5,
};
const Heading = ({
children,
level,
}: Props) => (
React.createElement(
`h${level}`,
undefined,
children
)
);
export default Heading;