mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-11-22 05:37:55 +01:00
add on cancel
This commit is contained in:
parent
31073e7122
commit
84e28bc598
@ -5,6 +5,7 @@ import PropTypes from 'proptypes';
|
||||
import { placeOnGround, createScene, fetchProgress, slice, TabTemplate } from './utils.js';
|
||||
import injectSheet from 'react-jss';
|
||||
import RaisedButton from 'material-ui/RaisedButton';
|
||||
import FlatButton from 'material-ui/FlatButton';
|
||||
import Slider from 'material-ui/Slider';
|
||||
import LinearProgress from 'material-ui/LinearProgress';
|
||||
import { grey50, grey300, grey800, red500 } from 'material-ui/styles/colors';
|
||||
@ -89,7 +90,8 @@ class Interface extends React.Component {
|
||||
defaultQuality: PropTypes.string.isRequired,
|
||||
material: PropTypes.object.isRequired,
|
||||
defaultMaterial: PropTypes.string.isRequired,
|
||||
pixelRatio: PropTypes.number.isRequired
|
||||
pixelRatio: PropTypes.number.isRequired,
|
||||
onCancel: PropTypes.func
|
||||
};
|
||||
|
||||
static defaultProps = {
|
||||
@ -249,6 +251,11 @@ class Interface extends React.Component {
|
||||
{isSlicing && <p>{progress.action}</p>}
|
||||
{isSlicing && <LinearProgress mode="determinate" value={percentage} />}
|
||||
<div className={classes.sliceButtons}>
|
||||
{onCancel && <RaisedButton
|
||||
label="Cancel"
|
||||
className={`${classes.button}`}
|
||||
onTouchTap={onCancel}
|
||||
/>}
|
||||
<RaisedButton
|
||||
label="Print"
|
||||
primary
|
||||
|
Loading…
Reference in New Issue
Block a user