Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return (style?: React.CSSProperties) => {
if (style) {
const prefixedStyle = IS_NODE_ENV ? Prefixer.prefixAll(style) : prefixer.prefix(style);
if (IS_NODE_ENV) {
const { display } = style;
if (display && flexArr.includes(display)) {
// We can't apply this join with react-dom:
// #https://github.com/facebook/react/issues/6467
prefixedStyle.display = arrayProperties[display] || (arrayProperties[display] = prefixedStyle.display.map(t => replace2Dashes(t)).join("; display: "));
}
}
return prefixedStyle;
}
};
}
return (style?: React.CSSProperties) => {
if (!style) return;
const stylePrefixed = Prefixer.prefixAll(style);
const isFlex = ["flex", "inline-flex"].includes(style.display);
// We can't apply this join with react-dom:
// #https://github.com/facebook/react/issues/6467
if (isFlex) {
stylePrefixed.display = stylePrefixed.display.join("; display: ") + ";";
}
return stylePrefixed;
};
}
return (style) => InlineStylePrefixer.prefixAll(style);
} else {
return (style) => InlineStylePrefixer.prefixAll(style);
} else {