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

15 lines 507 B
export 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})`; }; //# sourceMappingURL=getMaxLabelSize.utils.js.map