Add <Heading> component
[MAILPOET-2770]
This commit is contained in:
19
assets/js/src/common/typography/heading/heading.tsx
Normal file
19
assets/js/src/common/typography/heading/heading.tsx
Normal 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;
|
Reference in New Issue
Block a user