UNPKG

@zohodesk/dot

Version:

In this Library, we Provide Some Basic Components to Build Your Application

55 lines (51 loc) 1.5 kB
/* eslint-disable react/forbid-component-props */ /**** Libraries ****/ import React, { Component } from 'react'; import { Email_defaultProps } from "./props/defaultProps"; import { Email_propTypes } from "./props/propTypes"; /**** Components ****/ import Link from "../../Link/Link"; /**** CSS ****/ import style from "./SecondaryText.module.css"; export default class Email extends Component { render() { let { text, urlData, urlName, className, title, href, isLink, target, fontWeight, customProps } = this.props; let { LinkProps = {}, TextProps = {} } = customProps; return /*#__PURE__*/React.createElement(React.Fragment, null, isLink ? /*#__PURE__*/React.createElement(Link, { href: href, title: title, urlData: urlData, urlName: urlName, target: target, className: style.link, ...LinkProps }, /*#__PURE__*/React.createElement("div", { className: `${style.textStyle} ${style[`font_${fontWeight}`]} ${className ? className : ''}` }, text)) : /*#__PURE__*/React.createElement("div", { className: `${style.secondaryText} ${style[`font_${fontWeight}`]} ${className ? className : ''}`, "data-title": title, ...TextProps }, text)); } } Email.propTypes = Email_propTypes; Email.defaultProps = Email_defaultProps; // if (__DOCS__) { // Email.docs = { // folderName: 'List', // componentGroup: 'EmailText' // }; // }