@dark-engine/platform-desktop
Version:
Dark renderer to desktop platforms like Windows, Linux, macOS via Nodegui and Qt
20 lines (19 loc) • 570 B
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
exports.useStyle = void 0;
const core_1 = require('@dark-engine/core');
function styled(strings, ...args) {
const style = (0, core_1.useMemo)(() => {
return strings
.map((x, idx) => x + (!(0, core_1.detectIsUndefined)(args[idx]) ? args[idx] : ''))
.join('')
.replace(/([:;])\s*/gm, '$1')
.trim();
}, [strings, ...args]);
return style;
}
function useStyle(config) {
return config(styled);
}
exports.useStyle = useStyle;
//# sourceMappingURL=use-style.js.map