ExceptionOption.js (919B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */ 4 import { 5 div, 6 input, 7 label, 8 } from "devtools/client/shared/vendor/react-dom-factories"; 9 import PropTypes from "devtools/client/shared/vendor/react-prop-types"; 10 11 export default function ExceptionOption({ 12 className, 13 isChecked = false, 14 label: inputLabel, 15 onChange, 16 }) { 17 return label( 18 { 19 className, 20 }, 21 input({ 22 type: "checkbox", 23 checked: isChecked, 24 onChange, 25 }), 26 div( 27 { 28 className: "breakpoint-exceptions-label", 29 }, 30 inputLabel 31 ) 32 ); 33 } 34 35 ExceptionOption.propTypes = { 36 className: PropTypes.string.isRequired, 37 isChecked: PropTypes.bool.isRequired, 38 label: PropTypes.string.isRequired, 39 onChange: PropTypes.func.isRequired, 40 };