listpage-next 0.0.230 → 0.0.231

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.
@@ -1,8 +1,9 @@
1
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import { Button } from "antd";
3
- import { AsyncButton } from "../../../AsyncButton/index.js";
4
3
  import { useMemo } from "react";
5
4
  import { styled } from "styled-components";
5
+ import { CloseOutlined } from "@ant-design/icons";
6
+ import { AsyncButton } from "../../../AsyncButton/index.js";
6
7
  function useActions(props) {
7
8
  const { actionPosition = 'bottom', okText, cancelText, onOk, icon, title, onCancel, extraActions } = props;
8
9
  const actions = 'none' === actionPosition ? null : /*#__PURE__*/ jsxs(Fragment, {
@@ -28,7 +29,7 @@ function useActions(props) {
28
29
  /*#__PURE__*/ jsx(FlexContainer, {
29
30
  children: extraActions
30
31
  }),
31
- /*#__PURE__*/ jsx("div", {
32
+ /*#__PURE__*/ jsx(Fragment, {
32
33
  children: actions
33
34
  })
34
35
  ]
@@ -48,7 +49,7 @@ function useActions(props) {
48
49
  title
49
50
  ]
50
51
  }),
51
- /*#__PURE__*/ jsxs("div", {
52
+ /*#__PURE__*/ jsxs(FlexContainer, {
52
53
  children: [
53
54
  extraActions,
54
55
  actions
@@ -56,6 +57,26 @@ function useActions(props) {
56
57
  })
57
58
  ]
58
59
  });
60
+ if ('none' === actionPosition) return /*#__PURE__*/ jsxs(HeaderContainer, {
61
+ children: [
62
+ /*#__PURE__*/ jsxs(FlexContainer, {
63
+ children: [
64
+ icon,
65
+ title
66
+ ]
67
+ }),
68
+ /*#__PURE__*/ jsxs(FlexContainer, {
69
+ children: [
70
+ extraActions,
71
+ /*#__PURE__*/ jsx(Button, {
72
+ type: "text",
73
+ icon: /*#__PURE__*/ jsx(CloseOutlined, {}),
74
+ onClick: onCancel
75
+ })
76
+ ]
77
+ })
78
+ ]
79
+ });
59
80
  return /*#__PURE__*/ jsxs(FlexContainer, {
60
81
  children: [
61
82
  icon,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "listpage-next",
3
- "version": "0.0.230",
3
+ "version": "0.0.231",
4
4
  "description": "A React component library for creating filter forms with Ant Design",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",