123456789101112131415161718192021222324252627 |
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.styleHookSingleton = void 0;
- var tslib_1 = require("tslib");
- var React = tslib_1.__importStar(require("react"));
- var singleton_1 = require("./singleton");
- var styleHookSingleton = function () {
- var sheet = (0, singleton_1.stylesheetSingleton)();
- return function (styles, isDynamic) {
- React.useEffect(function () {
- sheet.add(styles);
- return function () {
- sheet.remove();
- };
- }, [styles && isDynamic]);
- };
- };
- exports.styleHookSingleton = styleHookSingleton;
|