mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-01-09 10:41:56 +00:00
dfb93c16ab
* Increases Modal's width to better fit in the content. * Restore the image side behavior so that images are sometimes on the left, not always on the right * Allows modal to dynamically size its height. * This reduces some awkward whitespace, and makes it so you can't just jam on the "Next" button since it moves a bit, should slow some people down to at least catch the headlines. * Restore the alert style on the opening modal * Provide a mobile-friendly progress stepper. * This module's markup kind of sucks, so the restyling code is heinous. Sorry. * Scrolls the user to the top after hitting "Next" or "Previous" * On mobile, you would stay scrolled at the bottom. Much nicer feeling now. * Tons of text and content spacing / color / size adjustments.
38 lines
1.1 KiB
TypeScript
38 lines
1.1 KiB
TypeScript
import React, { ReactElement } from 'react';
|
|
import './OnboardSlide.scss';
|
|
|
|
interface Props {
|
|
header: ReactElement<any> | string;
|
|
subheader?: ReactElement<any> | string;
|
|
content: ReactElement<any> | string;
|
|
image: string;
|
|
imageSide: 'left' | 'right';
|
|
}
|
|
|
|
class OnboardSlide extends React.Component<Props> {
|
|
public render() {
|
|
const { header, subheader, content, image, imageSide } = this.props;
|
|
return (
|
|
<div className="OnboardSlide">
|
|
<h3 className="OnboardSlide-header">{header}</h3>
|
|
{subheader && <p className="OnboardSlide-subheader">{subheader}</p>}
|
|
<div className="OnboardSlide-body">
|
|
{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>
|
|
)}
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|
|
}
|
|
|
|
export default OnboardSlide;
|