UNPKG

@zohodesk/dot

Version:

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

33 lines (32 loc) 1.07 kB
import React, { Component } from 'react'; import { defaultProps } from "./props/defaultProps"; import { propTypes } from "./props/propTypes"; import style from "./Field.module.css"; export default class Field extends Component { render() { let { width, children, rowBreak, column, className, containerClass, dataId } = this.props; return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", { className: `${containerClass ? containerClass : ''} ${column == 'single' ? `${style.singleColumn}` : `${style[width]} `}`, "data-id": dataId, "data-test-id": dataId }, /*#__PURE__*/React.createElement("div", { className: `${className ? className : ''} ${`fieldWidth_${width}`}` }, children)), rowBreak && /*#__PURE__*/React.createElement("div", { className: style.rowBreak })); } } Field.propTypes = propTypes; Field.defaultProps = defaultProps; // if (__DOCS__) { // Field.docs = { // componentGroup: 'ModuleAddForm' // }; // }