UNPKG

@zohodesk/components

Version:

In this Package, we Provide Some Basic Components to Build Web App

38 lines (36 loc) 955 B
import React from 'react'; import { defaultProps } from "./props/defaultProps"; import { propTypes } from "./props/propTypes"; import cssJSLogic from "./css/cssJSLogic"; import { mergeStyle } from '@zohodesk/utils'; import defaultStyle from "./css/Typography.module.css"; const Typography = props => { const { children, $ui_tagName, $i18n_dataTitle, testId, customId, $tagAttributes_text, $a11yAttributes_text, customStyle } = props; const style = mergeStyle(defaultStyle, customStyle); const { typographyClass } = cssJSLogic({ props, style }); return /*#__PURE__*/React.createElement($ui_tagName, { className: typographyClass, 'data-title': $i18n_dataTitle, 'data-id': customId, 'data-test-id': testId, ...$tagAttributes_text, ...$a11yAttributes_text }, children); }; Typography.propTypes = propTypes; Typography.defaultProps = defaultProps; export default Typography;