react-custom-properties
Version:
A React component for applying CSS Variables (Custom Properties)
15 lines (13 loc) • 413 B
JavaScript
/**
* A helper utility to abstract directly removing style properties
* from DOM elements. This is mainly to help with testing.
*
* @param {object} element - The DOM element to be styled
* @param {string} property - The name of the property to set
*
* @return {void}
*/
const removeStyleProperty = (element, property) => {
element.style.removeProperty(property);
};
export default removeStyleProperty;