@zohodesk/dot
Version:
In this Library, we Provide Some Basic Components to Build Your Application
72 lines (67 loc) • 2.48 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 { PhoneNumber_defaultProps } from "./props/defaultProps";
import { PhoneNumber_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 PhoneNumber extends Component {
render() {
let {
text,
urlData,
urlName,
className,
title,
href,
dataId,
isLink,
target,
hasReload,
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,
dataId: dataId,
target: target,
hasReload: hasReload,
className: style.link
}, LinkProps), /*#__PURE__*/React.createElement(Typography, {
$ui_size: "12",
$flag_dotted: true,
$ui_className: `${style.phoneNumber} ${style.phonetxt} ${className ? className : ''}`,
$ui_weight: fontWeight,
$ui_highlightConfig: isHighlighted ? highlightData : DUMMY_OBJECT
}, text)) : /*#__PURE__*/React.createElement(Typography, {
$tagAttributes_text: TextProps,
$ui_className: `${style.secondaryText} ${style.phonetxt} ${className ? className : ''}`,
$ui_weight: fontWeight,
$ui_size: "12",
$flag_dotted: true,
$i18n_dataTitle: title,
$ui_highlightConfig: isHighlighted ? highlightData : DUMMY_OBJECT
}, text));
}
}
PhoneNumber.propTypes = PhoneNumber_propTypes;
PhoneNumber.defaultProps = PhoneNumber_defaultProps; // if (__DOCS__) {
// PhoneNumber.docs = {
// folderName: 'List',
// componentGroup: 'PhoneNumberText'
// };
// }