Skip to content

Support array of objects in style property #2239

@jacobrask

Description

@jacobrask

As proposed in React Future, it would be nice to support a list of style objects in the style property. The objects would be automatically merged (in order, with the last object overriding the previous one).

var boxStyle = {
  padding: 10,
  background: "hotpink"
};
var bixBoxStyle = {
  margin: 10,
  width: 300
};

<div style={boxStyle} />
<div style={[boxStyle, bigBoxStyle]} />
<div style={[boxStyle, bigBoxStyle, {background: "navy"}]} />

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions