UNPKG

@zohodesk/dot

Version:

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

29 lines (27 loc) 940 B
import React from 'react'; import { defaultProps } from "./props/defaultProps"; import { propTypes } from "./props/propTypes"; import style from "../../../../form/layout/Field/Field.module.css"; const Field = props => { const { width, children, rowBreak, column, className, containerClass, dataId } = 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; export default Field;