Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default function cloneWithClasses(element, state) {
let currentClasses = element.props.className ? element.props.className.split(' ') : [];
let newClasses = classnames.apply(null, currentClasses.concat(getClasses(state)));
const newElement = React.cloneElement(element, {
className: newClasses,
transitionState: state
});
return newElement;
}