File size: 606 Bytes
f5071ca |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
import React from "react";
const darkComponentTextAlignStyles = {
display: 'flex',
flexDirection: 'column',
textAlign: 'center'
}
const darkComponent = props => {
const { topText, fontSize, bottomText, image } = props
return (
<>
<div style={darkComponentTextAlignStyles}>
{topText && (
<h3 style={{ fontSize: fontSize }}>{topText}</h3>
)}
{bottomText && (
<h3 style={{ fontSize: fontSize }}>{bottomText}</h3>
)}
</div>
{image && <img src={image} alt="dark component" />}
</>
);
};
export default darkComponent;
|