UNPKG

@razorpay/blade

Version:

The Design System that powers Razorpay

11 lines (8 loc) 1.98 kB
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties'; import React__default from 'react'; import { AnimatedBaseInputWrapper } from './AnimatedBaseInputWrapper.native.js'; import { BaseBox } from '../../Box/BaseBox/BaseBox.native.js'; import { jsx, jsxs } from 'react/jsx-runtime'; var _excluded=["children","validationState","currentInteraction","isLabelLeftPositioned","isTextArea","showAllTags","setShowAllTagsWithAnimation","maxTagRows","numberOfLines","isTableInputCell","topContent","bottomContent","inputRowOverlay"];var _BaseInputWrapper=function _BaseInputWrapper(_ref,ref){var children=_ref.children,validationState=_ref.validationState,currentInteraction=_ref.currentInteraction;_ref.isLabelLeftPositioned;var isTextArea=_ref.isTextArea,showAllTags=_ref.showAllTags,setShowAllTagsWithAnimation=_ref.setShowAllTagsWithAnimation,maxTagRows=_ref.maxTagRows,numberOfLines=_ref.numberOfLines,isTableInputCell=_ref.isTableInputCell,topContent=_ref.topContent,bottomContent=_ref.bottomContent,inputRowOverlay=_ref.inputRowOverlay,props=_objectWithoutProperties(_ref,_excluded);var hasExtraContent=Boolean(topContent||bottomContent||inputRowOverlay);return jsx(AnimatedBaseInputWrapper,Object.assign({ref:ref,isTextArea:isTextArea,validationState:validationState,currentInteraction:currentInteraction,showAllTags:showAllTags,maxTagRows:maxTagRows,setShowAllTagsWithAnimation:setShowAllTagsWithAnimation,numberOfLines:numberOfLines,isTableInputCell:isTableInputCell},props,{children:hasExtraContent?jsxs(BaseBox,{display:"flex",flexDirection:"column",width:"100%",children:[topContent,jsxs(BaseBox,{display:"flex",flexDirection:"row",width:"100%",alignItems:isTextArea?'flex-start':'center',position:inputRowOverlay?'relative':undefined,children:[children,inputRowOverlay]}),bottomContent]}):children}));};var BaseInputWrapper=React__default.forwardRef(_BaseInputWrapper); export { BaseInputWrapper }; //# sourceMappingURL=BaseInputWrapper.js.map