workfloworchestrator / orchestrator-ui-library

Component library for the orchestrator-ui (v2) which is published in npm
8 stars 3 forks source link

Load either light or dark css from EUI #1102

Open ricardovdheijden opened 4 months ago

ricardovdheijden commented 4 months ago

The _app.tsx file imports a css file from EUI. This is the light theme css.

A solution must be found to either import light or dark theme css file and needs to keep working when toggling back and forth.

One thing to consider: EUI is migrating all styles to a css-in-js solution. Once an EUI component is migrated to css-in-js it wil properly toggle to dark theme and back in our app. This means that we could decide to "wait out" the migration of all EUI components.

acidjunk commented 4 months ago

For the time being: You could probably dynamically load a CSS, in the head section of the app?

E.g.:

<Head>
    <link rel="stylesheet"  href={`/styles/eui_theme_${themeMode}.min.css`}  />
</Head>                        
wouter1975 commented 2 weeks ago

Can be closed?

wouter1975 commented 1 week ago

Waiting for EUI to come with new update.