score:2

Accepted answer
class Gallery extends React.Component {
  render() {
    const { backgroundColor } = this.props;
    return <div style={{ width: "100%", height: "100%", backgroundColor }} />;
  }
}

const App = () => {
  return (
    <div style={{ height: "50vh", width: "50vw" }}>
      <Gallery backgroundColor="blue" />
    </div>
  );
};

Related Query

More Query from same tag