UNPKG

react-input-pin-code

Version:

Pin input built with React component and styled-components

23 lines (20 loc) 568 B
import { useCallback } from 'react'; import { setElementCssVariable } from '../utils/css/index.js'; const useCssVariable = ({ targetElRef }) => { const setCssVariable = useCallback((name, value) => { const { current: targetEl } = targetElRef; if (!targetEl) { return; } setElementCssVariable({ element: targetEl, name, value, }); }, [targetElRef]); return { setCssVariable, }; }; export { useCssVariable as u }; //# sourceMappingURL=hook-C_LtjIcQ.js.map