How to use the @fortawesome/react-fontawesome.FontAwesomeIcon function in @fortawesome/react-fontawesome

To help you get started, we’ve selected a few @fortawesome/react-fontawesome 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 mikechabot / react-json-form-engine / dist / components / util / Asterisk.js View on Github external
var Asterisk = function Asterisk(_ref) {
  var size = _ref.size,
      message = _ref.message;
  return _react.default.createElement(_reactFontawesome.FontAwesomeIcon, {
    icon: "asterisk",
    title: message || 'Validation Error',
    className: "has-text-danger",
    size: size || '1x'
  });
};
github mikechabot / react-json-form-engine / dist / components / validation / ValidationFieldError.js View on Github external
var ValidationFieldError = function ValidationFieldError(_ref) {
  var id = _ref.id;
  return _react["default"].createElement("span", {
    className: "has-text-danger"
  }, _react["default"].createElement(_reactFontawesome.FontAwesomeIcon, {
    icon: "exclamation-triangle"
  }), "\xA0There was an error rendering field: \"", id, "\"", _react["default"].createElement(_FormControlHint["default"], {
    text: "Check console for additional details.",
    className: "is-danger"
  }));
};
github mikechabot / react-json-form-engine / dist / components / validation / ValidationAPIError.js View on Github external
var ValidationAPIError = function ValidationAPIError(_ref) {
  var error = _ref.error;
  var message = parseAPICheckErrorMessage(error);
  return _react["default"].createElement("div", {
    className: "__rjfe__ panel"
  }, _react["default"].createElement("div", {
    className: "panel-heading"
  }, _react["default"].createElement("div", {
    className: "validation-api-error"
  }, _react["default"].createElement(_reactFontawesome.FontAwesomeIcon, {
    icon: "exclamation-triangle",
    className: "has-text-danger"
  }), "\xA0", _react["default"].createElement("h3", null, message || 'Error initializing FormEngine'))));
};
github mikechabot / react-json-form-engine / dist / components / form / util / FormControlHint.js View on Github external
var FormControlHint = function FormControlHint(_ref) {
  var text = _ref.text,
      icon = _ref.icon,
      className = _ref.className;
  var derivedClassName = className || 'has-text-grey-light';
  return _react["default"].createElement("div", {
    className: "help ".concat(derivedClassName, " form-control-hint")
  }, _react["default"].createElement(_reactFontawesome.FontAwesomeIcon, {
    icon: icon || 'question-circle'
  }), "\xA0", text);
};
github mikechabot / react-json-form-engine / dist / components / form / util / FormSubsectionTitle.js View on Github external
value: function getSubsection(subsection, hideSubsectionSubtitles) {
      if (!subsection.subtitle || hideSubsectionSubtitles) return null;
      return _react.default.createElement("h2", {
        className: "subtitle",
        style: styles.subtitle
      }, _react.default.createElement(_reactFontawesome.FontAwesomeIcon, {
        icon: "angle-right"
      }), " ", subsection.subtitle);
    }
  }, {
github mikechabot / react-json-form-engine / dist / components / validation / ValidationFieldError.js View on Github external
var ValidationFieldError = function ValidationFieldError(_ref) {
  var id = _ref.id;
  return _react.default.createElement("span", {
    className: "has-text-danger"
  }, _react.default.createElement(_reactFontawesome.FontAwesomeIcon, {
    icon: "exclamation-triangle"
  }), "\xA0There was an error rendering field: \"", id, "\"", _react.default.createElement(_FormControlHint.default, {
    text: "Check console for additional details.",
    className: "is-danger"
  }));
};
github mikechabot / react-json-form-engine / dist / components / form / util / FormControlHint.js View on Github external
var FormControlHint = function FormControlHint(_ref) {
  var text = _ref.text,
      icon = _ref.icon,
      className = _ref.className;
  var derivedClassName = className || 'has-text-grey-light';
  return _react.default.createElement("div", {
    style: {
      display: 'flex',
      alignItems: 'center'
    },
    className: "help ".concat(derivedClassName)
  }, _react.default.createElement(_reactFontawesome.FontAwesomeIcon, {
    icon: icon || 'question-circle'
  }), "\xA0", text);
};
github mikechabot / react-json-form-engine / dist / components / form / util / FormTitle.js View on Github external
value: function renderFormIcon(instance) {
      if (instance.getFormIcon()) {
        return _react["default"].createElement(_reactFontawesome.FontAwesomeIcon, {
          icon: [instance.getFormIconPrefix(), instance.getFormIcon()],
          className: "m-r-sm"
        });
      }
    }
  }, {
github mikechabot / react-json-form-engine / dist / components / form / controls / Radio.js View on Github external
function renderOption(field, value, option, index, onUpdate) {
  var isEven = index % 2 === 0;
  return _react["default"].createElement("div", {
    key: index,
    className: "radio-option-container ".concat(index === 0 ? '' : field.inline ? 'm-l-sm' : ''),
    onClick: function onClick() {
      return onUpdate(option.id || isEven, field.id);
    }
  }, _react["default"].createElement("div", {
    className: "radio-option-label"
  }, _react["default"].createElement(_reactFontawesome.FontAwesomeIcon, {
    icon: ['far', getIcon(option, value, isEven)]
  }), "\xA0", _react["default"].createElement("div", null, option.title)), _react["default"].createElement(_FormChildren["default"], {
    field: option
  }));
}
github mikechabot / react-json-form-engine / dist / components / form / util / FormSubsectionTitle.js View on Github external
value: function getSubsection(subsection, hideSubsectionSubtitles) {
      if (!subsection[SUBTITLE] || hideSubsectionSubtitles) return null;
      return _react["default"].createElement("h2", {
        className: "subtitle is-size-7 m-t-xs"
      }, _react["default"].createElement(_reactFontawesome.FontAwesomeIcon, {
        icon: "angle-right"
      }), " ", subsection[SUBTITLE]);
    }
  }, {

@fortawesome/react-fontawesome

Official React component for Font Awesome

MIT
Latest version published 6 months ago

Package Health Score

92 / 100
Full package analysis

Similar packages