Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
module.exports = function clientContext(cfg) {
var userAgent = ExecutionEnvironment.canUseDOM ? window.navigator.userAgent : null;
var plugins = [
radium.Plugins.mergeStyleArray,
radium.Plugins.checkProps,
radium.Plugins.resolveMediaQueries,
radium.Plugins.resolveInteractionStyles,
radium.Plugins.prefix,
prefixAll,
radium.Plugins.checkProps
];
/* eslint-disable react/no-multi-comp */
var ClientContext = React.createClass({
childContextTypes: {
radiumConfig: React.PropTypes.shape({
plugins: React.PropTypes.array,
userAgent: React.PropTypes.string
})
},
function ConfiguredRadium(component) {
return Radium({
plugins: [
Radium.Plugins.mergeStyleArray,
// Radium.Plugins.checkProps,
Radium.Plugins.resolveMediaQueries,
Radium.Plugins.resolveInteractionStyles,
Radium.Plugins.keyframes,
Radium.Plugins.visited,
Radium.Plugins.prefix,
// Radium.Plugins.checkProps
]
})(component);
}
function ConfiguredRadium(component) {
return Radium({
plugins: [
Radium.Plugins.mergeStyleArray,
// Radium.Plugins.checkProps,
Radium.Plugins.resolveMediaQueries,
Radium.Plugins.resolveInteractionStyles,
Radium.Plugins.keyframes,
Radium.Plugins.visited,
Radium.Plugins.prefix,
// Radium.Plugins.checkProps
]
})(component);
}
render() {
const {headers} = this.context;
return (
);
}
}
// DEPRECATED: This configuration is the Radium default configuration.
import Radium from 'radium'
const config = {
userAgent: 'all',
plugins: [
Radium.Plugins.mergeStyleArray,
Radium.Plugins.checkProps,
Radium.Plugins.resolveMediaQueries,
Radium.Plugins.resolveInteractionStyles,
Radium.Plugins.keyframes,
Radium.Plugins.visited,
Radium.Plugins.removeNestedStyles,
Radium.Plugins.prefix,
Radium.Plugins.checkProps,
],
}
export const ConfiguredRadium = component => Radium(config)(component)
render() {
const {headers} = this.context;
return (
);
}
}
// DEPRECATED: This configuration is the Radium default configuration.
import Radium from 'radium'
const config = {
userAgent: 'all',
plugins: [
Radium.Plugins.mergeStyleArray,
Radium.Plugins.checkProps,
Radium.Plugins.resolveMediaQueries,
Radium.Plugins.resolveInteractionStyles,
Radium.Plugins.keyframes,
Radium.Plugins.visited,
Radium.Plugins.removeNestedStyles,
Radium.Plugins.prefix,
Radium.Plugins.checkProps,
],
}
export const ConfiguredRadium = component => Radium(config)(component)
module.exports = function clientContext(cfg) {
var userAgent = ExecutionEnvironment.canUseDOM ? window.navigator.userAgent : null;
var plugins = [
radium.Plugins.mergeStyleArray,
radium.Plugins.checkProps,
radium.Plugins.resolveMediaQueries,
radium.Plugins.resolveInteractionStyles,
radium.Plugins.prefix,
prefixAll,
radium.Plugins.checkProps
];
/* eslint-disable react/no-multi-comp */
var ClientContext = React.createClass({
childContextTypes: {
radiumConfig: React.PropTypes.shape({
plugins: React.PropTypes.array,
userAgent: React.PropTypes.string
})
},
componentDidMount: function componentDidMount() {
if (ExecutionEnvironment.canUseDOM) {