Skip to content

Commit

Permalink
chore: up README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxim Givanyan committed Feb 7, 2024
1 parent a5fc436 commit 74dd765
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ By default, the engine for the web is supported.
The engine needs to be passed to the `themeManager` constructor.

```ts
import { webEngineFactory } from 'components/super/i-static-page/modules/theme/system-theme-extractor/engines/web';
import WebEngine from 'components/super/i-static-page/modules/theme/system-theme-extractor/engines/web/engine';

class iRoot extends iStaticPage {
@system<iStaticPage>((o) => themeManagerFactory(
// ...other required parameters for themeManager
webEngineFactory(o)
new WebEngine(o)
))

readonly theme: CanUndef<ThemeManager>;
Expand All @@ -33,7 +33,7 @@ export default class CustomEngine implements SystemThemeExtractor {
```

The `SystemThemeExtractor` interface specifies that the `getSystemTheme` method
should return a promise-like object so that you can compute the system theme asynchronously.
should return a promise object so that you can compute the system theme asynchronously.
If synchronous computation is relevant in your case, you can use `SyncPromise`.

See `components/super/i-static-page/modules/theme` for details

0 comments on commit 74dd765

Please sign in to comment.