web: Components: Formatted code
This commit is contained in:
parent
1ff4c9d80f
commit
5b9d02bcc3
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user