styled-components / babel-plugin-styled-components

Improve the debugging experience and add server-side rendering support to styled-components
MIT License
1.07k stars 141 forks source link

Better naming for styled components nested in objects. #375

Open avin-kavish opened 2 years ago

avin-kavish commented 2 years ago

Would be good to have class names based on the full object path for styled components declared inside objects. i.e.,

// Product.tsx

const Wishlist = {
  Wrapper: styled`

  `
}

<Wishlist.Wrapper>

</Wishlist.Wrapper>

currently, the generated class name is Product__Wrapper would be good to have Product_Wishlist__Wrapper instead.