menu
announcement

Spectrum is now read-only. Learn more about the decision in our official announcement.

styled-components

Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress!

Channels
Team

Design System with microrepo architecture

June 14, 2021 at 2:10pm

Design System with microrepo architecture

June 14, 2021 at 2:10pm
Hi! I'm working on the product that will need to provide few (3-4) CRA projects. There is also a must have priority on themes, because I'll need to cover 100+ themes for different clients for all the apps. I've started to implement the solution with few react libraries:
  1. WhiteLabel (set of customizations - ThemeProvider),
  2. DesignSystem (with WhiteLabel as a peer dependency),
  3. Client 1 (with WH and DS as dependency)
  4. Client 2 (with WH and DS as dependency)
  5. Client 3 (with WH and DS as dependency)
  6. Client 4 (with WH and DS as dependency)
But from obvious reasons every library has his own styled-components instance and they are not aware of each other. I know why this approach is not working, but is it a chance to cover somehow the cases I've described? I could put WH inside DS but then I'd have a problem with determining theme context inside clients.

June 14, 2021 at 3:17pm
Why isn't it working? What is the exact setup and how does it not work for you?