UNPKG

@zohodesk/layout

Version:

Unified Component Library - Layout

35 lines (34 loc) 855 B
import React from 'react'; import defaultProps from "./props/defaultProps"; import propTypes from "./props/propTypes"; import cssJSLogic from "./css/cssJSLogic"; const Flex = /*#__PURE__*/React.forwardRef((props, ref) => { const { $ui_tagName, testId, customId, children, $event_onClick, $tagAttributes_container, $a11yAttributes_container } = props; /* css classname added based on logic */ const { flexClass } = cssJSLogic({ props }); return /*#__PURE__*/React.createElement($ui_tagName, { 'data-test-id': testId, 'data-id': customId, className: flexClass, ref, onClick: $event_onClick, ...$tagAttributes_container, ...$a11yAttributes_container }, children); }); Flex.displayName = 'Flex'; Flex.defaultProps = defaultProps; Flex.propTypes = propTypes; export default Flex;