UNPKG

@kubit-ui-web/react-components

Version:

Kubit React Components is a customizable, accessible library of React web components, designed to enhance your application's user experience

19 lines 654 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getMaxLabelSize = void 0; const getMaxLabelSize = (proceed, inputId) => { if (!proceed) { return undefined; } const input = document.getElementById(inputId); if (!input) { return undefined; } const { width, paddingRight, paddingLeft } = window.getComputedStyle(input); const wdt = width ?? '100%'; const pddLft = paddingLeft ?? '0'; const pddRght = paddingRight ?? '0'; return `calc(${wdt} - ${pddRght} - ${pddLft})`; }; exports.getMaxLabelSize = getMaxLabelSize; //# sourceMappingURL=getMaxLabelSize.utils.js.map