'use strict';

var PropTypes = require('prop-types');
var React = require('react');
var valueCardUtils = require('./valueCardUtils.js');

function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }

var PropTypes__default = /*#__PURE__*/_interopDefault(PropTypes);
var React__default = /*#__PURE__*/_interopDefault(React);

var propTypes = {
  unit: PropTypes__default.default.string,
  testId: PropTypes__default.default.string
};
var defaultProps = {
  unit: '',
  testId: 'unit'
};
var BEM_BASE = "".concat(valueCardUtils.BASE_CLASS_NAME, "__attribute-unit");

/**
 * This components job is determining how to render different kinds of units
 */
var UnitRenderer = function UnitRenderer(_ref) {
  var unit = _ref.unit,
    testId = _ref.testId;
  return /*#__PURE__*/React__default.default.createElement("span", {
    "data-testid": testId,
    style: {
      '--default-font-size': '1.25rem'
    },
    className: BEM_BASE
  }, unit);
};
UnitRenderer.propTypes = propTypes;
UnitRenderer.defaultProps = defaultProps;
UnitRenderer.__docgenInfo = {
  "description": "This components job is determining how to render different kinds of units",
  "methods": [],
  "displayName": "UnitRenderer",
  "props": {
    "unit": {
      "defaultValue": {
        "value": "''",
        "computed": false
      },
      "description": "",
      "type": {
        "name": "string"
      },
      "required": false
    },
    "testId": {
      "defaultValue": {
        "value": "'unit'",
        "computed": false
      },
      "description": "",
      "type": {
        "name": "string"
      },
      "required": false
    }
  }
};
var UnitRenderer$1 = UnitRenderer;

module.exports = UnitRenderer$1;
