How to use the radium.wrap function in radium

To help you get started, we’ve selected a few radium examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github FormidableLabs / radium / js / app.jsx View on Github external
var React = require('react');
var Radium = require('radium');
var color = require('color');

var Button = React.createClass(Radium.wrap({
  displayName: "Button",

  propTypes: {
    kind: React.PropTypes.oneOf(['primary', 'warning']).isRequired
  },

  render: function () {
    // Radium extends the style attribute to accept an array. It will merge
    // the styles in order. We use this feature here to apply the primary
    // or warning styles depending on the value of the `kind` prop. Since its
    // all just JavaScript, you can use whatever logic you want to decide which
    // styles are applied (props, state, context, etc).
    return (
github FormidableLabs / es6-interactive-guide / components / footer.jsx View on Github external
logoLink: {
    display: 'block',
    margin: '16px 0'
  },

  link: {
    fontWeight: 700,
    color: '#FF4136',

    ':hover': {
      color: '#fff'
    }
  }
};

export default React.createClass(Radium.wrap({
  displayName: 'Footer',

  render() {
    return (
      <footer style="{styles.footer}">
        
          <p>
           Made with love in Seattle by

           <a href="http://formidablelabs.com" style="{styles.logoLink}">
             </a></p></footer>
github conceptviz / conceptviz.github.io / src / index.jsx View on Github external
e.stopPropagation();
    if (this.props.clickable) {
      this.props.onClick(this.props.name, this.props.tagGroup);
    }
  },

  onMouseOver() {
    this.setState({hovered: true});
  },

  onMouseOut() {
    this.setState({hovered: false});
  },
}));

var Resource = React.createClass(Radium.wrap({
  render() {
    var {title, linkUrl, imgUrl, imgFit, authors, stars, tags, blurb} = this.props.data;

    var contentsStyle = {
      display: 'inline-block',
      verticalAlign: 'top',
      color: textColor,
      fontSize: '13.25px',
      marginLeft: dims.horPadding,
      maxWidth: dims.contentsWidth,
      [foldedMediaQuery]: {
        marginTop: dims.horPadding,
        marginLeft: 0
      },
    };
github FormidableLabs / es6-interactive-guide / components / sidebar.jsx View on Github external
lineHeight: '81px',
    border: '4px solid'
  },

  highlight: {
    color: '#E55A5F'
  },

  text: {
    fontFamily: 'kulturista-web, Georgia, Times New Roman, serif',
    fontWeight: 300,
    display: 'block'
  }
}

export default React.createClass(Radium.wrap({
  render() {
    return (
      <div style="{styles.base}">
        <h1 style="{logoStyles.base}">
          
            <span style="{logoStyles.badge}">
              ES
              <span style="{logoStyles.highlight}">6</span>
            </span>
            <span style="{logoStyles.text}">Interactive Guide</span>
          
        </h1>
</div>
github FormidableLabs / es6-interactive-guide / components / container.jsx View on Github external
paddingRight: 32,
    paddingLeft: 32
  },

  '@media (min-width: 800px)': {
    paddingRight: 48,
    paddingLeft: 48
  },

  '@media (min-width: 1024px)': {
    paddingRight: 80,
    paddingLeft: 80
  }
};

export default React.createClass(Radium.wrap({
  render() {
    return (
      <div style="{[">
        {this.props.children}
      </div>
    );
  }
}));
github FormidableLabs / es6-interactive-guide / index.jsx View on Github external
const exampleHandlers = exampleListMap.map((exampleObj, index) =&gt; {
  return React.createClass(Radium.wrap({
    displayName: exampleObj.name,
    render() {
      return (
        <div>
          <h2 style="{headingStyles.base}">
            <span style="{headingStyles.counter}">{index + 1}</span>
            {exampleObj.name}
          </h2>
          
        </div>
      );
    }
  }));
});