The main server, and probably only repository in this org.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
717 B

import React, {useState} from "react";
import {Button, Modal, ModalBody, ModalFooter, ModalHeader} from "reactstrap";
import ColorPicker from "../Misc/ColorPicker";
function ColorModal({value, onConfirm, onCancel}) {
const [color, setColor] = useState(value);
return (
<Modal isOpen={true}>
<ModalHeader>Fargevalg</ModalHeader>
<ModalBody style={{margin: "0 auto"}}>
<ColorPicker color={color} onChange={setColor}/>
</ModalBody>
<ModalFooter>
<Button color="primary" onClick={() => onConfirm(color)}>Lagre</Button>
{" "}
<Button color="secondary" onClick={onCancel}>Avbryt</Button>
</ModalFooter>
</Modal>
);
}
export default ColorModal;