moderator-toolbox-nxg-for-reddit / modules/modmatrix/components/MatrixStyleProvider

modules/modmatrix/components/MatrixStyleProvider

Functions

MatrixStyleProvider()

MatrixStyleProvider(hrefs): Element

Defined in: extension/data/modules/modmatrix/components/MatrixStyleProvider.tsx:19

Injects <link> elements for the provided stylesheet URLs and exposes a readiness flag via StylesReadyContext that becomes true once every sheet has loaded or failed.

Parameters

hrefs

Stylesheet URLs to inject (typically cross-origin sheets that need to be re-attached).

children

ReactNode

hrefs

string[]

Returns

Element

Variables

StylesReadyContext

const StylesReadyContext: Context<boolean>

Defined in: extension/data/modules/modmatrix/components/MatrixStyleProvider.tsx:12

true once all stylesheets passed to MatrixStyleProvider have settled (loaded or errored). Consumers use this to defer icon-visibility checks until CSS rules are available.