COMPOSE
import { COMPOSE } from '@dr.pogodin/react-themes';
enum COMPOSE {
DEEP = 'DEEP',
SOFT = 'SOFT',
SWAP = 'SWAP',
}
Supported theme composition modes. Two component themes with lower (L),
and higher (H) priorities can be merged in the following ways:
-
.DEEP— In deep composition mode all classes fromHare applied with higher specifity, on top of all classes fromL, which are applied with lower specifity. Thus, in case of conflicting rules, themeHoverridesL, but otherwise rules fromLare used as defaults. It is the default composition mode. -
.SOFT— In soft composition mode all classes fromHare applied, while classes from themeLare applied only if they are absent in themeH. Thus, any classes defined inHcompletely override corresponding classes fromL. -
.SWAP— In swap mode only classes from themeHare applied, thus themeHcompletely overridesL.