'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _styledComponents = require('styled-components');

var _styledComponents2 = _interopRequireDefault(_styledComponents);

var _icons = require('./helpers/icons');

var _icons2 = _interopRequireDefault(_icons);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var Icon = _styledComponents2.default.i.withConfig({ displayName: 'Icon' }).withConfig({
  displayName: 'Icon__Icon'
})(['font-family: \'Bandwidth\';font-size: ', ';color: inherit;font-style: normal;display: inline-block;&::before {content: "', '";display: block;color: inherit;}'], function (_ref) {
  var theme = _ref.theme,
      size = _ref.size;
  return '' + size || theme.icon.fontSize;
}, function (_ref2) {
  var name = _ref2.name,
      iconsHelper = _ref2.iconsHelper;
  return iconsHelper(name) || iconsHelper('help_2');
});

Icon.defaultProps = {
  theme: {
    icon: { fontSize: '16px', fg: 'inherit' }
  },

  name: 'attention',
  iconsHelper: _icons2.default,

  size: '16px'
};

Icon.usage = '\n# Icon\n\nIcons let you easily render some of our icons. Pass in the `name` prop to specify which one.\n\n```\n<Icon name="checkmark" />\n```\n\n## Icons\n\nThe icon definition file is in `components/helpers/icons.js`\n\n' + Object.keys(_icons.map).map(function (name) {
  return '* ' + name;
}).join('\n') + '\n';

exports.default = Icon;