var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

import React from 'react';
import { PatternFlyThemeProvider, StyledConstants, StyledBox, StyledText } from '../index';

var ResponsiveStyles = function (_React$Component) {
  _inherits(ResponsiveStyles, _React$Component);

  function ResponsiveStyles() {
    _classCallCheck(this, ResponsiveStyles);

    return _possibleConstructorReturn(this, (ResponsiveStyles.__proto__ || Object.getPrototypeOf(ResponsiveStyles)).apply(this, arguments));
  }

  _createClass(ResponsiveStyles, [{
    key: 'render',
    value: function render() {
      var space = StyledConstants.space,
          colors = StyledConstants.colors,
          fontSizes = StyledConstants.fontSizes,
          borders = StyledConstants.borders;


      return React.createElement(
        PatternFlyThemeProvider,
        null,
        React.createElement(
          StyledBox,
          { pb: space.md },
          React.createElement(
            StyledText,
            { py: space.md },
            'In this example, the Box widths are: 100% below the smallest breakpoint, 50% from the next breakpoint and up, 25% from the next breakpoint and up'
          ),
          React.createElement(StyledBox, { width: [1, 1 / 2, 1 / 4], height: 50, bg: colors.success_100, display: 'inline-block' }),
          React.createElement(StyledBox, { width: [1, 1 / 2, 1 / 4], height: 50, bg: colors.info_100, display: 'inline-block' }),
          React.createElement(StyledBox, { width: [1, 1 / 2, 1 / 4], height: 50, bg: colors.warning_100, display: 'inline-block' }),
          React.createElement(StyledBox, { width: [1, 1 / 2, 1 / 4], height: 50, bg: colors.danger_100, display: 'inline-block' }),
          React.createElement(
            StyledBox,
            { fontSize: [fontSizes.xl, fontSizes.lg, fontSizes.md, fontSizes.sm] },
            'This text changes the font size depending on the screen width'
          ),
          React.createElement(
            StyledBox,
            { m: [space.xs, space.sm, space.md, space.lg], height: 50, border: borders.md },
            'This box has different margins depending on the screen width'
          ),
          React.createElement(
            StyledBox,
            { p: [space.xs, space.sm, space.md, space.lg], height: 50, border: borders.md },
            'This box has different paddings depending on the screen width'
          )
        )
      );
    }
  }]);

  return ResponsiveStyles;
}(React.Component);

export default ResponsiveStyles;