UNPKG

@zohodesk/dot

Version:

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

54 lines (50 loc) 1.67 kB
/* eslint-disable react/forbid-component-props */ /**** Libraries ****/ import React, { Component } from 'react'; import { Website_defaultProps } from "./props/defaultProps"; import { Website_propTypes } from "./props/propTypes"; /**** Components ****/ import Typography from '@zohodesk/components/es/Typography/Typography'; import { DUMMY_OBJECT } from '@zohodesk/components/es/utils/Common'; import ExternalLink from "../../ExternalLink/ExternalLink"; /**** CSS ****/ import style from "./SecondaryText.module.css"; export default class Website extends Component { render() { let { text, className, title, href, dataId, isLink, target, isHighlighted, highlightData } = this.props; return /*#__PURE__*/React.createElement(React.Fragment, null, isLink ? /*#__PURE__*/React.createElement(ExternalLink, { className: style.link, href: href, title: title, dataId: dataId, target: target }, /*#__PURE__*/React.createElement(Typography, { $flag_dotted: true, $ui_size: "12", $ui_className: `${style.linkWithText} ${className ? className : ''}`, $ui_highlightConfig: isHighlighted ? highlightData : DUMMY_OBJECT }, text)) : /*#__PURE__*/React.createElement(Typography, { $ui_size: "12", $flag_dotted: true, $ui_className: `${style.secondaryText} ${className ? className : ''}`, $i18n_dataTitle: text }, text)); } } Website.propTypes = Website_propTypes; Website.defaultProps = Website_defaultProps; // if (__DOCS__) { // Website.docs = { // folderName: 'List', // componentGroup: 'WebsiteText' // }; // }