@braineet/ui
Version:
Braineet design system
23 lines (22 loc) • 1.22 kB
JavaScript
var _excluded = ["fontFamily"];
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
import React from 'react';
import Text from '../text';
/**
* The `Strong` component.
*/
import { jsx as _jsx } from "react/jsx-runtime";
var Strong = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
var fontFamily = _ref.fontFamily,
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);
return /*#__PURE__*/_jsx(Text, _extends({
ref: ref,
fontFamily: fontFamily,
fontWeight: fontFamily === 'display' ? '700' : 'bold'
}, restProps));
});
Strong.defaultProps = {
fontFamily: 'text'
};
export default Strong;