UNPKG

@roo-ui/components

Version:

51 lines (49 loc) 1.88 kB
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } import Text from '../Text'; var Heading = Text.withComponent('p', { target: "euiw19h0", label: "Heading" }); Heading.defaultProps = _objectSpread({}, Text.defaultProps, { m: 0, mb: 2, textStyle: 'h3' }); Heading.h1 = Heading.withComponent('h1', { target: "euiw19h1" }); Heading.h1.defaultProps = _objectSpread({}, Heading.defaultProps, { textStyle: 'h1' }); Heading.h2 = Heading.withComponent('h2', { target: "euiw19h2" }); Heading.h2.defaultProps = _objectSpread({}, Heading.defaultProps, { textStyle: 'h2' }); Heading.h3 = Heading.withComponent('h3', { target: "euiw19h3" }); Heading.h3.defaultProps = _objectSpread({}, Heading.defaultProps, { textStyle: 'h3' }); Heading.h4 = Heading.withComponent('h4', { target: "euiw19h4" }); Heading.h4.defaultProps = _objectSpread({}, Heading.defaultProps, { textStyle: 'h4' }); Heading.h5 = Heading.withComponent('h5', { target: "euiw19h5" }); Heading.h5.defaultProps = _objectSpread({}, Heading.defaultProps, { textStyle: 'h5' }); Heading.h6 = Heading.withComponent('h6', { target: "euiw19h6" }); Heading.h6.defaultProps = _objectSpread({}, Heading.defaultProps, { textStyle: 'h6' }); export default Heading;