Page MenuHomePhabricator

docs: Design a theme selector for the component demos
Open, LowestPublic

Description

From T296689:

Design a theme selector that changes the theme of the component demos (similar to how the LTR/RTL switcher changes the directionality of the component demos)

@bmartinezcalvo found this example in IBM's Carbon design system. We would want something similar that changes the theme for the component demos.

The current LTR/RTL selector changes the directionality for all demos on the page, and the theme selector could work like that too. But we could also have a separate directionality selector and theme selector for each demo on the page, if we make it part of the demo wrapper (the box that has the "reset" and "show code" buttons); then each of the demos' theme and directionality could be controlled separately. Both of these are technically feasible, which one we go with is a design decision.