Add more typings & refactor code accordingly

Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
This commit is contained in:
Lorenzo Alberto Maria Ambrosi
2020-09-03 15:46:18 +02:00
parent 4872fa3d6e
commit deb3db0fff
8 changed files with 30 additions and 105 deletions

View File

@@ -78,14 +78,14 @@ const CancelButton = styled(({ type, onClick, ...props }) => {
export class ProgressButton extends React.PureComponent<ProgressButtonProps> {
public render() {
const type = this.props.type;
const percentage = this.props.percentage;
const warning = this.props.warning;
const { status, position } = fromFlashState({
type,
type: this.props.type,
percentage,
position: this.props.position,
});
const type = this.props.type || 'default';
if (this.props.active) {
return (
<>