Skip to content

Commit

Permalink
style(form): in generator mode, the minimum height of the object cont…
Browse files Browse the repository at this point in the history
…ainer is 30px
  • Loading branch information
mengshang918 committed May 9, 2022
1 parent 945196a commit 2b4a030
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 24 deletions.
9 changes: 6 additions & 3 deletions packages/drip-form/src/container/ObjectContainer/index.styl
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
.object-container-err
color red

.drip-form_objectContainer--collapse
&>div>div
background-color #EFF6FF
.drip-form_objectContainer
min-height 30px

&--collapse
&>div>div
background-color #EFF6FF
48 changes: 27 additions & 21 deletions packages/drip-form/src/container/ObjectContainer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @Author: jiangxiaowei
* @Date: 2021-08-11 15:26:55
* @Last Modified by: jiangxiaowei
* @Last Modified time: 2022-03-11 13:55:35
* @Last Modified time: 2022-04-24 18:50:14
*/
import React, { useMemo, memo } from 'react'
import { useTitle } from '@jdfed/hooks'
Expand Down Expand Up @@ -150,26 +150,32 @@ const objectContainer = memo<Props & RenderFnProps & ObjectContainerProps>(
</Panel>
</Collapse>
) : (
renderCoreFn({
hasDefault,
uiComponents,
dataSchema,
uiSchema,
errors,
formData,
onQuery,
onValidate,
dispatch,
containerMap,
parentUiSchemaKey,
parentDataSchemaKey,
parentFormDataKey: fieldKey,
customComponents,
get,
getKey,
containerHoc,
arrayKey,
})
<div
className={cx({
'drip-form_objectContainer': formMode === 'generator',
})}
>
{renderCoreFn({
hasDefault,
uiComponents,
dataSchema,
uiSchema,
errors,
formData,
onQuery,
onValidate,
dispatch,
containerMap,
parentUiSchemaKey,
parentDataSchemaKey,
parentFormDataKey: fieldKey,
customComponents,
get,
getKey,
containerHoc,
arrayKey,
})}
</div>
)}
</>
)
Expand Down

0 comments on commit 2b4a030

Please sign in to comment.