mi6 / ic-ui-kit

Intelligence Community UI Kit (based on StencilJS)
MIT License
19 stars 22 forks source link

[ic-theme] Add mechanism for setting global dark mode theme #2061

Open GCHQ-Developer-530 opened 5 days ago

GCHQ-Developer-530 commented 5 days ago

Summary

Implement a mode or color prop to theme so that users can set dark mode, which subsequently updates every component to use the correct option for the appearance prop.

💬 Description

Would need a function to get all components, update appearance to dark or light depending on the mode.

Would also need functions within some components for slotted content and ensuring the appearance prop on those are updated as well.

If the appearance prop is specifically set on a component then that should take precedence over the theme appearance.

Build into theme the option to either match system preferences for dark mode, force light, or force dark.

💰 Use value

Enables a simple dark mode for users.

MI6-255 commented 4 days ago

Consider for Page Header how the inverse colour will be needed