2018-01-11 18:13:14 +00:00
|
|
|
import React, { ReactElement } from 'react';
|
|
|
|
import './OnboardSlide.scss';
|
|
|
|
|
|
|
|
interface Props {
|
|
|
|
header: ReactElement<any> | string;
|
2018-01-13 08:26:08 +00:00
|
|
|
subheader?: ReactElement<any> | string;
|
|
|
|
content: ReactElement<any> | string;
|
|
|
|
image: string;
|
|
|
|
imageSide: 'left' | 'right';
|
2018-01-11 18:13:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class OnboardSlide extends React.Component<Props> {
|
|
|
|
public render() {
|
2018-01-13 08:26:08 +00:00
|
|
|
const { header, subheader, content, image, imageSide } = this.props;
|
2018-01-11 18:13:14 +00:00
|
|
|
return (
|
|
|
|
<div className="OnboardSlide">
|
2018-01-13 08:26:08 +00:00
|
|
|
<h3 className="OnboardSlide-header">{header}</h3>
|
|
|
|
{subheader && <p className="OnboardSlide-subheader">{subheader}</p>}
|
2018-01-11 18:13:14 +00:00
|
|
|
<div className="OnboardSlide-body">
|
2018-01-13 08:26:08 +00:00
|
|
|
{imageSide === 'left' && (
|
|
|
|
<div className="OnboardSlide-image is-left">
|
|
|
|
<img className="OnboardSlide-image-img" src={image} />
|
|
|
|
</div>
|
|
|
|
)}
|
|
|
|
<section className="OnboardSlide-content">{content}</section>
|
|
|
|
{imageSide === 'right' && (
|
|
|
|
<div className="OnboardSlide-image is-right">
|
|
|
|
<img className="OnboardSlide-image-img" src={image} />
|
|
|
|
</div>
|
|
|
|
)}
|
2018-01-11 18:13:14 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default OnboardSlide;
|