@zohodesk/dot
Version:
In this Library, we Provide Some Basic Components to Build Your Application
68 lines (63 loc) • 2.31 kB
JavaScript
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); }
/* 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 Typography from '@zohodesk/components/es/Typography/Typography';
import { DUMMY_OBJECT } from '@zohodesk/components/es/utils/Common';
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,
isHighlighted,
highlightData
} = this.props;
let {
LinkProps = {},
TextProps = {}
} = customProps;
return /*#__PURE__*/React.createElement(React.Fragment, null, isLink ? /*#__PURE__*/React.createElement(Link, _extends({
href: href,
title: title,
urlData: urlData,
urlName: urlName,
target: target,
className: style.link
}, LinkProps), /*#__PURE__*/React.createElement(Typography, {
$flag_dotted: true,
$ui_size: "12",
$ui_weight: fontWeight,
$ui_className: `${style.linkWithText} ${className ? className : ''}`,
$ui_highlightConfig: isHighlighted ? highlightData : DUMMY_OBJECT
}, text)) : /*#__PURE__*/React.createElement(Typography, {
$tagAttributes_text: TextProps,
$ui_size: "12",
$flag_dotted: true,
$ui_className: `${style.secondaryText} ${className ? className : ''}`,
$ui_weight: fontWeight,
$i18n_dataTitle: title,
$ui_highlightConfig: isHighlighted ? highlightData : DUMMY_OBJECT
}, text));
}
}
Email.propTypes = Email_propTypes;
Email.defaultProps = Email_defaultProps; // if (__DOCS__) {
// Email.docs = {
// folderName: 'List',
// componentGroup: 'EmailText'
// };
// }