ar-design 0.1.87 → 0.1.88

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.
@@ -5,5 +5,11 @@ interface IProps extends IChildren {
5
5
  content?: React.JSX.Element;
6
6
  onConfirm?: (confirm: boolean) => void;
7
7
  windowBlur?: boolean;
8
+ config?: {
9
+ buttons: {
10
+ okButton: string;
11
+ cancelButton: string;
12
+ };
13
+ };
8
14
  }
9
15
  export default IProps;
@@ -5,7 +5,7 @@ import Button from "../../form/button";
5
5
  import Typography from "../../data-display/typography";
6
6
  import ReactDOM from "react-dom";
7
7
  const { Title } = Typography;
8
- const Popover = ({ children, title, message, content, onConfirm, windowBlur }) => {
8
+ const Popover = ({ children, title, message, content, onConfirm, windowBlur, config }) => {
9
9
  // refs
10
10
  const _arPopoverWrapper = useRef(null);
11
11
  const _arPopover = useRef(null);
@@ -62,11 +62,11 @@ const Popover = ({ children, title, message, content, onConfirm, windowBlur }) =
62
62
  React.createElement(Button, { status: "success", size: "small", onClick: () => {
63
63
  onConfirm(true);
64
64
  setOpen(false);
65
- } }, "Evet"),
65
+ } }, config?.buttons.okButton ?? "Evet"),
66
66
  React.createElement(Button, { status: "light", size: "small", onClick: () => {
67
67
  onConfirm(false);
68
68
  setOpen(false);
69
- } }, "Hay\u0131r")))), document.body),
69
+ } }, config?.buttons.cancelButton ?? "Hayır")))), document.body),
70
70
  React.createElement("div", { ref: _arPopoverElement, onClick: () => setOpen((prev) => !prev) }, children)));
71
71
  };
72
72
  export default Popover;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ar-design",
3
- "version": "0.1.87",
3
+ "version": "0.1.88",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",