@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jswork/react-ant-form-schema",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "main": "dist/main.cjs.js",
5
5
  "module": "dist/main.esm.js",
6
6
  "types": "dist/main.d.ts",
package/src/index.tsx CHANGED
@@ -29,28 +29,23 @@ export type ReactAntdFormSchemaProps = {
29
29
  */
30
30
  header?: ReactNode;
31
31
  /**
32
- * The footer content.
32
+ * The form actions className.
33
33
  */
34
- footer?: ReactNode;
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
- footer: null,
45
- footerClassName: '',
40
+ actionsClassName: '',
46
41
  };
47
42
 
48
43
  const ReactAntdFormSchema: FC<ReactAntdFormSchemaProps> = (props) => {
49
- const { className, meta, header, footer, children, footerClassName, ...rest } = {
44
+ const { className, meta, header, children, actionsClassName, ...rest } = {
50
45
  ...defaultProps,
51
46
  ...props,
52
47
  };
53
- const footerNode = footer || (children as ReactNode);
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={footerClassName}
58
+ className={actionsClassName}
64
59
  style={{ marginBottom: 0 }}>
65
60
  {footerNode}
66
61
  </Form.Item>