How to use the radium.Style 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 1egoman / funnies / dist / react.js View on Github external
value: function cssTransitionStyles() {
      return [_react2.default.createElement(_radium.Style, {
        scopeSelector: '.funnies-text.funnies-enter',
        rules: styles.funniesText.funniesEnter,
        key: 0
      }), _react2.default.createElement(_radium.Style, {
        scopeSelector: '.funnies-text.funnies-enter-active',
        rules: styles.funniesText.funniesEnterActive,
        key: 1
      }), _react2.default.createElement(_radium.Style, {
        scopeSelector: '.funnies-text.funnies-leave',
        rules: styles.funniesText.funniesLeave,
        key: 2
      }), _react2.default.createElement(_radium.Style, {
        scopeSelector: '.funnies-text.funnies-leave-active',
        rules: styles.funniesText.funniesLeaveActive,
        key: 3
      })];
github mathieuancelin / lets-react / slide-deck / src / deck.jsx View on Github external
/*eslint new-cap:0, max-statements:0*/
/*global window document localStorage*/

import React from "react/addons";
import assign from "object-assign";
import cloneWithProps from "react/lib/cloneWithProps";
import Radium from "radium";
import _ from "lodash";
import Presenter from "./presenter";
import Export from "./export";
import Overview from "./overview";

React.initializeTouchEvents(true);

const Style = Radium.Style;

import Progress from "./progress";
const TransitionGroup = Radium(React.addons.TransitionGroup);

@Radium
class Deck extends React.Component {
  constructor(props) {
    super(props);
    this._handleKeyPress = this._handleKeyPress.bind(this);
    this._handleClick = this._handleClick.bind(this);
    this._goToSlide = this._goToSlide.bind(this);
    this.state = {
      lastSlide: null
    };
  }
  componentDidMount() {
github experience-experiments / react-easy-chart / npmdist / line-chart / index.js View on Github external
value: function createStyle() {
      var _props5 = this.props;
      var style = _props5.style;
      var grid = _props5.grid;
      var verticalGrid = _props5.verticalGrid;
      var yAxisOrientRight = _props5.yAxisOrientRight;


      var uid = this.uid;
      var scope = '.line-chart-' + uid;
      var axisStyles = (0, _shared.getAxisStyles)(grid, verticalGrid, yAxisOrientRight);
      var rules = (0, _lodash2.default)({}, _shared.defaultStyles, style, axisStyles);

      return _react2.default.createElement(_radium.Style, {
        scopeSelector: scope,
        rules: rules
      });
    }
  }, {
github experience-experiments / react-easy-chart / npmdist / scatterplot-chart / index.js View on Github external
value: function render() {
      this.setWidthAndHeight();
      var node = (0, _reactFauxDom.createElement)('svg');
      var chart = (0, _d.select)(node).attr('width', this.width).attr('height', this.height).append('g').attr('id', 'area-' + this.uid).attr('transform', 'translate(' + this.margin.left + ', ' + this.margin.top + ')');

      chart.append('g').attr('id', 'axis-x-' + this.uid);
      chart.append('g').attr('id', 'axis-y-' + this.uid);
      chart.append('g').attr('id', 'dots-' + this.uid);

      var uid = Math.floor(Math.random() * new Date().getTime());

      return _react2.default.createElement(
        'div',
        { ref: this.uid, className: 'scatterplot_chart' + uid },
        _react2.default.createElement(_radium.Style, { scopeSelector: '.scatterplot_chart' + uid, rules: (0, _lodash2.default)({}, _shared.defaultStyle, this.props.style, (0, _shared.getAxisStyles)(this.props.grid, this.props.verticalGrid, this.props.yAxisOrientRight)) }),
        node.toReact()
      );
    }
  }]);
github pubpub / pubpub-editor / packages / pubpub-editor / dist / prosemirror-setup / rich-nodes / components / latexComponent.js View on Github external
_core.Button,
				{ iconName: 'maximize', onClick: this.changeToBlock },
				'Block'
			) : _react2.default.createElement(
				_core.Button,
				{ iconName: 'minimize', onClick: this.changeToInline },
				'Inline'
			)
		);

		var isPopOverOpen = closePopOver ? false : undefined;

		return _react2.default.createElement(
			'span',
			{ onClick: this.forceSelection },
			_react2.default.createElement(_radium.Style, { rules: _katexCss2.default }),
			_react2.default.createElement(
				_core.Popover,
				{
					content: popoverContent,
					isOpen: isPopOverOpen,
					interactionKind: _core.PopoverInteractionKind.CLICK,
					className: 'blockPopover',
					popoverClassName: 'pt-minimal pt-dark',
					position: _core.Position.BOTTOM,
					useSmartPositioning: false },
				_react2.default.createElement('span', {
					ref: 'latexElem',
					className: 'pub-embed-latex' + (selected ? ' selected' : ''),
					dangerouslySetInnerHTML: { __html: displayHTML } })
			)
		);
github experience-experiments / react-easy-chart / npmdist / legend / index.js View on Github external
value: function createStyle() {
      var styles = this.props.styles;


      var uid = this.uid;
      var rules = (0, _lodash2.default)({}, _defaultStyles2.default, styles);
      var scope = '.legend-container-' + uid;

      return _react2.default.createElement(_radium.Style, {
        scopeSelector: scope,
        rules: rules
      });
    }
  }, {
github pubpub / pubpub-editor / packages / pubpub-render-files / dist / RenderFilePDF.js View on Github external
render: function render() {
		return _react2.default.createElement(
			'div',
			null,
			_react2.default.createElement(_radium.Style, { rules: {
					'.pdfWrapper .page': {
						position: 'relative',
						boxShadow: '0px 2px 5px #888',
						margin: '0px auto 0.5em',
						border: '0px solid transparent',
						borderImage: 'url("") 0 repeat'

					}
				} }),
			_react2.default.createElement(
				'div',
				{ id: 'container', className: 'pdfWrapper', style: styles.container },
				_react2.default.createElement('div', { id: 'viewer', className: 'pdfViewer' })
			)
		);
	}
github experience-experiments / react-easy-chart / npmdist / pie-chart / index.js View on Github external
value: function render() {
      var node = (0, _reactFauxDom.createElement)('svg');
      (0, _d.select)(node).attr('width', this.props.size).attr('height', this.props.size).append('g').attr('id', 'pie_' + this.uid).attr('transform', 'translate(' + this.getRadius() + ', ' + this.getRadius() + ')');
      (0, _d.select)(node).attr('width', this.props.size).attr('height', this.props.size).append('g').attr('id', 'labels_' + this.uid).attr('transform', 'translate(' + this.getRadius() + ', ' + this.getRadius() + ')');

      var uid = Math.floor(Math.random() * new Date().getTime());

      return _react2.default.createElement(
        'div',
        { className: 'pie_chart' + uid },
        _react2.default.createElement(_radium.Style, {
          scopeSelector: '.pie_chart' + uid,
          rules: (0, _lodash2.default)({}, _shared.defaultStyle, this.props.styles)
        }),
        node.toReact()
      );
    }
  }]);
github pubpub / pubpub-editor / packages / pubpub-editor / dist / prosemirror-setup / rich-nodes / components / iframeComponent.js View on Github external
_core.Button,
								{ iconName: 'maximize', onClick: this.changeToBlock },
								'Block'
						) : _react2.default.createElement(
								_core.Button,
								{ iconName: 'minimize', onClick: this.changeToInline },
								'Inline'
						)
				);

				var isPopOverOpen = closePopOver ? false : undefined;

				return _react2.default.createElement(
						'span',
						{ style: styles.display({ block: block, selected: selected }) },
						_react2.default.createElement(_radium.Style, { rules: katexStyles }),
						_react2.default.createElement(
								_core.Popover,
								{ content: popoverContent,
										isOpen: isPopOverOpen,
										interactionKind: _core.PopoverInteractionKind.CLICK,
										popoverClassName: 'pt-popover-content-sizing',
										position: _core.Position.BOTTOM,
										useSmartPositioning: false },
								block ? _react2.default.createElement('div', {
										ref: 'latexElem',
										className: 'pub-embed-latex',
										dangerouslySetInnerHTML: { __html: displayHTML },
										style: styles.output }) : _react2.default.createElement('span', {
										ref: 'latexElem',
										className: 'pub-embed-latex',
										dangerouslySetInnerHTML: { __html: displayHTML },
github experience-experiments / react-easy-chart / npmdist / bar-chart / index.js View on Github external
value: function createStyle() {
      var _props6 = this.props;
      var style = _props6.style;
      var yAxisOrientRight = _props6.yAxisOrientRight;
      var grid = _props6.grid;


      var uid = this.uid;
      var scope = '.bar-chart-' + uid;
      var axisStyles = (0, _shared.getAxisStyles)(grid, false, yAxisOrientRight);
      var rules = (0, _lodash2.default)({}, _shared.defaultStyles, style, axisStyles);

      return _react2.default.createElement(_radium.Style, {
        scopeSelector: scope,
        rules: rules
      });
    }
  }, {