panels: fixed them

This commit is contained in:
muerwre 2018-12-07 14:32:35 +07:00
parent d248b679ed
commit b8ba50517b
13 changed files with 171 additions and 182 deletions

View file

@ -1,13 +1,12 @@
import React from 'react';
import { MODES } from '$constants/modes';
import { editor } from '$modules/Editor';
import { Icon } from '$components/panels/Icon';
type Props = {
stopEditing: Function,
setMode: Function,
setEditing: Function,
width: Number,
};
export class CancelDialog extends React.Component<Props, void> {
@ -23,19 +22,23 @@ export class CancelDialog extends React.Component<Props, void> {
};
render() {
return (
<div className="helper cancel-helper">
<div className="helper__text danger">
<Icon icon="icon-cancel-1" />
<div className="big upper">Закрыть редактор?</div>
</div>
<div className="helper__buttons">
<div className="button router-helper__button" onClick={this.cancel}>
Удалить измения
</div>
const { width } = this.props;
<div className="button primary router-helper__button" onClick={this.proceed}>
Вернуться
return (
<div className="control-dialog" style={{ width }}>
<div className="helper cancel-helper">
<div className="helper__text danger">
<Icon icon="icon-cancel-1" />
<div className="big upper">Закрыть редактор?</div>
</div>
<div className="helper__buttons">
<div className="button router-helper__button" onClick={this.cancel}>
Удалить измения
</div>
<div className="button primary router-helper__button" onClick={this.proceed}>
Вернуться
</div>
</div>
</div>
</div>