score:1

Accepted answer
class LargeDialog extends Component {
  render() {
    return (
      <WrapperDiv className={this.props.className}>
        <div>{this.props.children}</div>
      </WrapperDiv>
    );
  }
}

const WrapperLargeDialog = styled(LargeDialog)`
  ${WrapperDiv} {
    background-color: blue;
  }
`;
// LargeDialog should be red.
// WrapperLargeDialog should be blue.
class App extends Component {
  render() {
    return (
      <div>
        <LargeDialog />
        <br />
        <WrapperLargeDialog>
          <WrapperDiv />
        </WrapperLargeDialog>
      </div>
    );
  }
}

Related Query

More Query from same tag