Mirador defines its styles as json and delegate classnames generation to the @material-ui/core/styles library. In production, the generated class names are deterministic and unique into a given StylesContext. Each mirador instance creates a new StylesContext, leading to classnames not being unique accross several Mirador instances.
Mirador exposes the MUI's createGenerateClassNameOptions which allows tweaking the generation of class names.
Here we add a unique prefix to every Mirador instances through the use of a counter.
Mirador defines its styles as json and delegate classnames generation to the
@material-ui/core/styles
library. In production, the generated class names are deterministic and unique into a givenStylesContext
. Each mirador instance creates a newStylesContext
, leading to classnames not being unique accross several Mirador instances. Mirador exposes the MUI'screateGenerateClassNameOptions
which allows tweaking the generation of class names. Here we add a unique prefix to every Mirador instances through the use of a counter.