@rango-dev/ui 0.1.10-next.69 → 0.1.10-next.70

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": "@rango-dev/ui",
3
- "version": "0.1.10-next.69",
3
+ "version": "0.1.10-next.70",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -75,7 +75,7 @@
75
75
  "@radix-ui/react-radio-group": "^1.1.1",
76
76
  "@radix-ui/react-switch": "^1.0.1",
77
77
  "@radix-ui/react-tooltip": "^1.0.2",
78
- "@rango-dev/wallets-shared": "^0.1.11-next.69",
78
+ "@rango-dev/wallets-shared": "^0.1.11-next.70",
79
79
  "@stitches/react": "^1.2.8",
80
80
  "rango-sdk": "^0.1.11",
81
81
  "react-virtualized-auto-sizer": "^1.0.7",
@@ -85,5 +85,5 @@
85
85
  "publishConfig": {
86
86
  "access": "public"
87
87
  },
88
- "gitHead": "35fad4db1d491a9589a8215b0c4a4e2f541d07f2"
88
+ "gitHead": "86b7f454818cbf0bf5e4ca3c80f47914557a389f"
89
89
  }
@@ -10,6 +10,7 @@ export interface PropTypes {
10
10
  open: boolean;
11
11
  onClose: () => void;
12
12
  content: React.ReactNode;
13
+ action?: React.ReactNode;
13
14
  containerStyle?: CSSProperties;
14
15
  contentStyle?: CSSProperties;
15
16
  }
@@ -33,8 +34,12 @@ const ModalContainer = styled('div', {
33
34
  display: 'flex',
34
35
  flexDirection: 'column',
35
36
  boxShadow: '$s',
37
+ zIndex: 10,
38
+ });
39
+ const Row = styled('div', {
40
+ display: 'flex',
41
+ alignItems: 'center',
36
42
  });
37
-
38
43
  const ModalHeader = styled('div', {
39
44
  display: 'flex',
40
45
  justifyContent: 'space-between',
@@ -48,12 +53,19 @@ const ContentContainer = styled('div', {
48
53
  });
49
54
 
50
55
  export function Modal(props: PropTypes) {
51
- const { title, content, open, onClose, containerStyle, contentStyle } = props;
56
+ const {
57
+ title,
58
+ content,
59
+ open,
60
+ onClose,
61
+ containerStyle,
62
+ action,
63
+ contentStyle,
64
+ } = props;
52
65
 
53
66
  const handleBackDropClick = (event: React.MouseEvent<HTMLDivElement>) => {
54
67
  if (event.target === event.currentTarget) onClose();
55
68
  };
56
-
57
69
  return (
58
70
  <>
59
71
  {open &&
@@ -62,7 +74,10 @@ export function Modal(props: PropTypes) {
62
74
  <ModalContainer style={containerStyle}>
63
75
  <ModalHeader>
64
76
  <Typography variant="h4">{title}</Typography>
65
- <CloseIcon size={24} onClick={onClose} />
77
+ <Row>
78
+ {action}
79
+ <CloseIcon size={24} onClick={onClose} />
80
+ </Row>
66
81
  </ModalHeader>
67
82
  <ContentContainer style={contentStyle}>
68
83
  {content}