back to previous settings device
This commit is contained in:
parent
b3abffa5b7
commit
9430de90d0
1 changed files with 10 additions and 32 deletions
|
@ -4,21 +4,10 @@ import { connect } from "react-redux";
|
|||
import { RemoteService } from "../../../remote";
|
||||
|
||||
const DeleteModal = (props) => (
|
||||
<Modal
|
||||
trigger={
|
||||
<Button icon labelPosition="left" inverted color="red">
|
||||
<Icon name="trash alternate" />
|
||||
Delete device
|
||||
</Button>
|
||||
}
|
||||
closeIcon
|
||||
>
|
||||
<Modal trigger={<Button color="red">Remove</Button>} closeIcon>
|
||||
<Header icon="archive" content="Are you sure ?" />
|
||||
<Modal.Actions>
|
||||
<Button
|
||||
color="red"
|
||||
// onClick={this.closeModal}
|
||||
>
|
||||
<Button color="red">
|
||||
<Icon name="remove" /> No
|
||||
</Button>
|
||||
<Button onClick={() => props.removeDevice()} color="green">
|
||||
|
@ -49,28 +38,17 @@ const SettingsForm = (props) => {
|
|||
// {this.props.device.name}
|
||||
/>
|
||||
</Form.Field>
|
||||
|
||||
<Form.Field>
|
||||
<DeleteModal removeDevice={() => props.removeDevice(values)} />
|
||||
</Form.Field>
|
||||
//{" "}
|
||||
<Modal.Actions>
|
||||
<Button
|
||||
color="red"
|
||||
// onClick={this.closeModal}
|
||||
>
|
||||
<Icon name="remove" />
|
||||
Discard changes
|
||||
</Button>
|
||||
<Button
|
||||
onClick={() => props.saveFunction(values)}
|
||||
color="green"
|
||||
type="submit"
|
||||
>
|
||||
<Icon name="checkmark" />
|
||||
Save changes
|
||||
</Button>
|
||||
//{" "}
|
||||
</Modal.Actions>
|
||||
<Button
|
||||
onClick={() => props.saveFunction(values)}
|
||||
color="blue"
|
||||
type="submit"
|
||||
>
|
||||
Save
|
||||
</Button>
|
||||
</Form>
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue