UNPKG

@activecollab/components

Version:

ActiveCollab Components

48 lines 1.67 kB
import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; const _excluded = ["variant", "as", "color", "italic", "tabularNums", "letterSpacing", "lineHeight", "align", "decoration", "transform", "overflow", "whitespace", "wordBreak", "weight", "className", "children"]; import React, { forwardRef } from "react"; import classNames from "classnames"; import { StyledTypography } from "./Styles"; export const Typography = /*#__PURE__*/forwardRef((_ref, ref) => { let { variant = "Title 1", as, color = "primary", italic = false, tabularNums = false, letterSpacing = "tight", lineHeight = "regular", align = "left", decoration = "none", transform = "regular", overflow = "visible", whitespace = "regular", wordBreak = "regular", weight = "regular", className, children } = _ref, props = _objectWithoutPropertiesLoose(_ref, _excluded); const Component = as || "div"; return /*#__PURE__*/React.createElement(StyledTypography, _extends({ as: Component, className: classNames("typography", className), $italic: italic, $tabularNums: tabularNums, $letterSpacing: letterSpacing, $lineHeight: lineHeight, $align: align, $decoration: decoration, $transform: transform, $overflow: overflow, $whitespace: whitespace, $wordBreak: wordBreak, $variant: variant, $color: color, $weight: weight, ref: ref }, props), children); }); Typography.displayName = "Typography"; //# sourceMappingURL=Typography.js.map