@jswork/react-ant-form-schema 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.cjs.js +1 -1
- package/dist/main.cjs.js.map +1 -1
- package/dist/main.d.mts +2 -6
- package/dist/main.d.ts +2 -6
- package/dist/main.esm.js +1 -1
- package/dist/main.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/index.tsx +6 -11
package/package.json
CHANGED
package/src/index.tsx
CHANGED
|
@@ -29,28 +29,23 @@ export type ReactAntdFormSchemaProps = {
|
|
|
29
29
|
*/
|
|
30
30
|
header?: ReactNode;
|
|
31
31
|
/**
|
|
32
|
-
* The
|
|
32
|
+
* The form actions className.
|
|
33
33
|
*/
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* The form content.
|
|
37
|
-
*/
|
|
38
|
-
footerClassName?: string;
|
|
34
|
+
actionsClassName?: string;
|
|
39
35
|
} & FormProps;
|
|
40
36
|
|
|
41
37
|
const defaultProps = {
|
|
42
38
|
className: '',
|
|
43
39
|
header: null,
|
|
44
|
-
|
|
45
|
-
footerClassName: '',
|
|
40
|
+
actionsClassName: '',
|
|
46
41
|
};
|
|
47
42
|
|
|
48
43
|
const ReactAntdFormSchema: FC<ReactAntdFormSchemaProps> = (props) => {
|
|
49
|
-
const { className, meta, header,
|
|
44
|
+
const { className, meta, header, children, actionsClassName, ...rest } = {
|
|
50
45
|
...defaultProps,
|
|
51
46
|
...props,
|
|
52
47
|
};
|
|
53
|
-
const footerNode =
|
|
48
|
+
const footerNode = children as ReactNode;
|
|
54
49
|
const _meta = deepMerge(DEFAULT_META, meta);
|
|
55
50
|
const _offset = _meta?.wrapperProps?.labelCol?.span || 4;
|
|
56
51
|
|
|
@@ -60,7 +55,7 @@ const ReactAntdFormSchema: FC<ReactAntdFormSchemaProps> = (props) => {
|
|
|
60
55
|
<NiceForm meta={_meta} />
|
|
61
56
|
<Form.Item
|
|
62
57
|
wrapperCol={{ offset: _offset }}
|
|
63
|
-
className={
|
|
58
|
+
className={actionsClassName}
|
|
64
59
|
style={{ marginBottom: 0 }}>
|
|
65
60
|
{footerNode}
|
|
66
61
|
</Form.Item>
|