web: Components: Formatted code

This commit is contained in:
Alexey Safronov 2019-10-31 17:33:55 +03:00
parent 1ff4c9d80f
commit 5b9d02bcc3

View File

@ -3,11 +3,22 @@ import PropTypes from "prop-types";
import Checkbox from "../../checkbox"; import Checkbox from "../../checkbox";
import Link from "../../link"; import Link from "../../link";
const ADSelectorRow = props => { class ADSelectorRow extends React.Component {
const { label, isChecked, style, onChange, onSelect, isMultiSelect, isSelected } = props; render() {
const {
label,
isChecked,
style,
onChange,
onSelect,
isMultiSelect,
isSelected
} = this.props;
console.log("ADSelectorRow render", label, isChecked);
return ( return (
<div className={`option ${isSelected && 'selected'}`} style={style}> <div className={`option ${isSelected && "selected"}`} style={style}>
{isMultiSelect ? ( {isMultiSelect ? (
<Checkbox <Checkbox
label={label} label={label}
@ -27,7 +38,8 @@ const ADSelectorRow = props => {
)} )}
</div> </div>
); );
}; }
}
ADSelectorRow.propTypes = { ADSelectorRow.propTypes = {
label: PropTypes.string, label: PropTypes.string,