Eslint prefer-object-spread (#9466)

* The rule.

* The result
This commit is contained in:
Evan Rusackas
2020-04-03 17:05:16 -07:00
committed by GitHub
parent 265a2feb29
commit 1cdfb829d7
29 changed files with 211 additions and 266 deletions

View File

@@ -88,9 +88,10 @@ export default class ColorPickerControl extends React.Component {
}
render() {
const c = this.props.value || { r: 0, g: 0, b: 0, a: 0 };
const colStyle = Object.assign({}, styles.color, {
const colStyle = {
...styles.color,
background: `rgba(${c.r}, ${c.g}, ${c.b}, ${c.a})`,
});
};
return (
<div>
<ControlHeader {...this.props} />