1
0
mirror of https://github.com/phuoc-ng/csslayout.git synced 2025-10-23 02:36:11 +02:00
Files
csslayout/client/components/Heading.tsx
2019-12-30 22:32:06 +07:00

37 lines
994 B
TypeScript

/**
* A collection of popular layouts and patterns made with CSS (https://csslayout.io)
* (c) 2019 - 2020 Nguyen Huu Phuoc <https://twitter.com/nghuuphuoc>
*/
import React from 'react';
interface HeadingProps {
title: string;
}
const Heading: React.FC<HeadingProps> = ({ title }) => {
return (
<div style={{ borderTop: '1px solid rgba(0, 0, 0, .2)', position: 'relative' }}>
<h3
style={{
backgroundColor: '#FFF',
fontSize: '20px',
fontWeight: 700,
left: '32px',
lineHeight: 1.5,
margin: 0,
padding: '0 8px',
position: 'absolute',
textTransform: 'uppercase',
top: 0,
transform: 'translate(0, -50%)',
}}
>
{title}
</h3>
</div>
);
};
export default Heading;