diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2020-06-06 16:02:04 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2020-06-06 16:02:04 -0700 |
commit | 8abf5781f32cd86e9647326204ceb53643751379 (patch) | |
tree | ccb0cbc77b716231ca2d106696a46c2347404482 /modern/src | |
parent | 4a9dcfa618e1d4d8393ac72d087bd85ebeaecdb9 (diff) | |
download | trackermap-web-8abf5781f32cd86e9647326204ceb53643751379.tar.gz trackermap-web-8abf5781f32cd86e9647326204ceb53643751379.tar.bz2 trackermap-web-8abf5781f32cd86e9647326204ceb53643751379.zip |
Use function for dialog
Diffstat (limited to 'modern/src')
-rw-r--r-- | modern/src/RemoveDialog.js | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/modern/src/RemoveDialog.js b/modern/src/RemoveDialog.js index 26bdeb55..a8aae8b2 100644 --- a/modern/src/RemoveDialog.js +++ b/modern/src/RemoveDialog.js @@ -1,27 +1,24 @@ import t from './common/localization' -import React, { Component } from 'react'; import Button from '@material-ui/core/Button'; import Dialog from '@material-ui/core/Dialog'; import DialogActions from '@material-ui/core/DialogActions'; import DialogContent from '@material-ui/core/DialogContent'; import DialogContentText from '@material-ui/core/DialogContentText'; -class RemoveDialog extends Component { - render() { - return ( - <Dialog - open={this.props.open} - onClose={() => { this.props.onClose() }}> - <DialogContent> - <DialogContentText>{t('sharedRemoveConfirm')}</DialogContentText> - </DialogContent> - <DialogActions> - <Button color="primary">{t('sharedRemove')}</Button> - <Button color="primary" autoFocus>{t('sharedCancel')}</Button> - </DialogActions> - </Dialog> - ); - } -} +const RemoveDialog = () => { + return ( + <Dialog + open={this.props.open} + onClose={() => { this.props.onClose() }}> + <DialogContent> + <DialogContentText>{t('sharedRemoveConfirm')}</DialogContentText> + </DialogContent> + <DialogActions> + <Button color="primary">{t('sharedRemove')}</Button> + <Button color="primary" autoFocus>{t('sharedCancel')}</Button> + </DialogActions> + </Dialog> + ); +}; export default RemoveDialog; |