beem-component 1.1.9 → 1.2.3

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.
@@ -55,6 +55,7 @@
55
55
  max-height: 100%;
56
56
  flex-grow: 1;
57
57
  height: 100%;
58
+ width: fit-content;
58
59
  }
59
60
 
60
61
  .chat-menu {
@@ -104,4 +105,23 @@
104
105
 
105
106
  .chat-footer>*:not(:last-child) {
106
107
  margin-right: 0.5rem;
108
+ }
109
+
110
+ .quick-reply {
111
+ display: flex;
112
+ justify-content: center;
113
+ }
114
+
115
+ .label-color-picker {
116
+ display: flex;
117
+ flex-direction: row;
118
+ justify-content: flex-start !important;
119
+ }
120
+
121
+ .label-color-picker>* {
122
+ margin-right: 0.5rem;
123
+ }
124
+
125
+ .label-select {
126
+ width: 100%;
107
127
  }
@@ -52,9 +52,8 @@ var BmAvatarWrapper = _styledComponents.default.div(_templateObject || (_templat
52
52
  }, function (_ref3) {
53
53
  var user = _ref3.user;
54
54
  if (user === "chatbot") return "".concat(_colors.BmPrimaryBlue);
55
- if (user === "employee") return "".concat(_colors.BmGrey100);
56
- if (user === "default") return "".concat(_colors.BmPrimaryBlue);
57
- return "".concat(_colors.BmPrimaryBlue);
55
+ if (user === "employee") return "".concat(_colors.BmPrimaryBlue);
56
+ return "".concat(_colors.BmGrey100);
58
57
  }, function (_ref4) {
59
58
  var type = _ref4.type;
60
59
  if (type === "circle") return "7.143rem";
@@ -63,9 +62,8 @@ var BmAvatarWrapper = _styledComponents.default.div(_templateObject || (_templat
63
62
  }, function (_ref5) {
64
63
  var user = _ref5.user;
65
64
  if (user === "chatbot") return "".concat(_colors.BmPrimaryBlue);
66
- if (user === "employee") return "".concat(_colors.BmGrey400);
67
- if (user === "default") return "".concat(_colors.BmPrimaryBlue);
68
- return "".concat(_colors.BmPrimaryBlue);
65
+ if (user === "employee") return "".concat(_colors.BmPrimaryBlue);
66
+ return "".concat(_colors.BmGrey100);
69
67
  });
70
68
 
71
69
  exports.BmAvatarWrapper = BmAvatarWrapper;
@@ -39,7 +39,7 @@ var _default = {
39
39
  }
40
40
  },
41
41
  user: {
42
- description: "Type of the Avatar ('chatbot', 'employee' or Material-UI icon)",
42
+ description: "Type of the Avatar ('chatbot', 'employee' or Material-UI icon), If not chatbot or employee, background color will be grey",
43
43
  defaultValue: {
44
44
  summary: undefined
45
45
  }
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.default = exports.BmImageWrapper = exports.BmImageChat = exports.BmImage = void 0;
6
+ exports.default = exports.MessageState = exports.BmImageWrapper = exports.BmImageChat = exports.BmImage = void 0;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
@@ -25,7 +25,7 @@ var _excluded = ["state", "file", "src", "fileName"],
25
25
  _excluded2 = ["state", "src", "fileName"],
26
26
  _excluded3 = ["children", "state", "displayTime", "status", "session", "src", "file", "fileName"];
27
27
 
28
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
28
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11;
29
29
 
30
30
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
31
31
 
@@ -59,7 +59,7 @@ var Details = _styledComponents.default.div(_templateObject3 || (_templateObject
59
59
  return "row";
60
60
  });
61
61
 
62
- var MessageDetails = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n max-width: 50%;\n > * {\n margin-top: 0.5rem;\n }\n"])));
62
+ var MessageDetails = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n max-width: 70%;\n > * {\n margin-top: 0.5rem;\n margin-bottom: 0.5rem;\n }\n"])));
63
63
 
64
64
  var Messages = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 0.5rem;\n background: ", ";\n color: ", ";\n border-radius: ", ";\n border: 0.071rem solid ", ";\n word-break: break-all;\n margin: 0rem;\n"])), function (_ref2) {
65
65
  var state = _ref2.state;
@@ -214,11 +214,15 @@ var BmImageChat = function BmImageChat(_ref13) {
214
214
  file: src,
215
215
  fileName: fileName
216
216
  }, rest))));
217
- }; //End of Component for Images
218
-
217
+ };
219
218
 
220
219
  exports.BmImageChat = BmImageChat;
221
220
 
221
+ var MessageState = _styledComponents.default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n @media all and (max-width: 960px) {\n display: none;\n }\n"]))); //End of Component for Images
222
+
223
+
224
+ exports.MessageState = MessageState;
225
+
222
226
  BmChat.Details = function (_ref14) {
223
227
  var children = _ref14.children,
224
228
  state = _ref14.state,
@@ -230,13 +234,12 @@ BmChat.Details = function (_ref14) {
230
234
  fileName = _ref14.fileName,
231
235
  rest = _objectWithoutProperties(_ref14, _excluded3);
232
236
 
233
- console.log("bbbb", fileName);
234
237
  return /*#__PURE__*/_react.default.createElement(Details, _extends({
235
238
  state: state
236
- }, rest), state === "inbound" && session && handleState({
239
+ }, rest), /*#__PURE__*/_react.default.createElement(MessageState, null, state === "inbound" && session && handleState({
237
240
  state: state,
238
241
  session: session
239
- }), /*#__PURE__*/_react.default.createElement(MessageDetails, null, src && /*#__PURE__*/_react.default.createElement(BmImageChat, _extends({
242
+ })), /*#__PURE__*/_react.default.createElement(MessageDetails, null, src && /*#__PURE__*/_react.default.createElement(BmImageChat, _extends({
240
243
  state: state,
241
244
  src: src,
242
245
  fileName: fileName
@@ -254,12 +257,12 @@ BmChat.Details = function (_ref14) {
254
257
  icon: /*#__PURE__*/_react.default.createElement(_icons.Done, null),
255
258
  color: "".concat(_colors.BmPrimaryBlack),
256
259
  size: "small"
257
- }))), state === "outbound" && session && handleState({
260
+ }))), /*#__PURE__*/_react.default.createElement(MessageState, null, state === "outbound" && session && handleState({
258
261
  state: state,
259
262
  session: session
260
- }));
263
+ })));
261
264
  };
262
265
 
263
- BmChat.Footer = _styledComponents.default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n padding: 0.5rem 0.5rem;\n > *:not(:last-child) {\n margin-bottom: 0.5rem;\n }\n"])));
266
+ BmChat.Footer = _styledComponents.default.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n padding: 0.5rem 0.5rem;\n > *:not(:last-child) {\n margin-bottom: 0.5rem;\n }\n"])));
264
267
  var _default = BmChat;
265
268
  exports.default = _default;
@@ -58,7 +58,7 @@ var Overlay = _styledComponents.default.div(_templateObject || (_templateObject
58
58
 
59
59
  exports.Overlay = Overlay;
60
60
 
61
- var ModalContent = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n border-radius: 0.25rem;\n padding: 1rem;\n margin: auto;\n background: ", ";\n width: ", ";\n > *:not(:last-child) {\n margin-bottom: 1rem;\n }\n"])), _colors.BmPrimaryWhite, function (_ref) {
61
+ var ModalContent = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n border-radius: 0.25rem;\n padding: 1rem;\n margin: auto;\n background: ", ";\n width: ", ";\n max-width: ", ";\n > *:not(:last-child) {\n margin-bottom: 1rem;\n }\n"])), _colors.BmPrimaryWhite, function (_ref) {
62
62
  var size = _ref.size;
63
63
 
64
64
  if (size) {
@@ -69,30 +69,42 @@ var ModalContent = _styledComponents.default.div(_templateObject2 || (_templateO
69
69
  return size;
70
70
  }
71
71
 
72
+ return "35.714rem";
73
+ }, function (_ref2) {
74
+ var size = _ref2.size;
75
+
76
+ if (size) {
77
+ if (size === "small") return "21.429rem";
78
+ if (size === "default") return "35.714rem";
79
+ if (size === "large") return "57.143rem";
80
+ if (size === "xlarge") return "81.429rem";
81
+ return size;
82
+ }
83
+
72
84
  return "35.714rem";
73
85
  });
74
86
 
75
87
  exports.ModalContent = ModalContent;
76
88
 
77
- var ModalWrapper = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n z-index: 9999;\n overflow-x: auto;\n overflow-y: auto;\n outline: 0;\n position: fixed;\n height: auto;\n top: ", ";\n left: 50%;\n transform: translate(-50%, -50%);\n"])), function (_ref2) {
78
- var centered = _ref2.centered;
89
+ var ModalWrapper = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n z-index: 9999;\n overflow-x: auto;\n overflow-y: auto;\n outline: 0;\n position: fixed;\n height: auto;\n top: ", ";\n left: 50%;\n transform: translate(-50%, -50%);\n"])), function (_ref3) {
90
+ var centered = _ref3.centered;
79
91
 
80
92
  if (centered) {
81
93
  return "50%";
82
94
  }
83
95
 
84
- return "10%";
96
+ return "15%";
85
97
  });
86
98
 
87
99
  exports.ModalWrapper = ModalWrapper;
88
100
 
89
- var BmModal = function BmModal(_ref3) {
90
- var children = _ref3.children,
91
- show = _ref3.show,
92
- size = _ref3.size,
93
- onHide = _ref3.onHide,
94
- centered = _ref3.centered,
95
- rest = _objectWithoutProperties(_ref3, _excluded);
101
+ var BmModal = function BmModal(_ref4) {
102
+ var children = _ref4.children,
103
+ show = _ref4.show,
104
+ size = _ref4.size,
105
+ onHide = _ref4.onHide,
106
+ centered = _ref4.centered,
107
+ rest = _objectWithoutProperties(_ref4, _excluded);
96
108
 
97
109
  var _useState = (0, _react.useState)(show),
98
110
  _useState2 = _slicedToArray(_useState, 2),
@@ -134,13 +146,13 @@ exports.BmModal = BmModal;
134
146
 
135
147
  var ModalHeader = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n"])));
136
148
 
137
- BmModal.Header = function (_ref4) {
138
- var children = _ref4.children,
139
- size = _ref4.size,
140
- onHide = _ref4.onHide,
141
- closeButton = _ref4.closeButton,
142
- show = _ref4.show,
143
- rest = _objectWithoutProperties(_ref4, _excluded2);
149
+ BmModal.Header = function (_ref5) {
150
+ var children = _ref5.children,
151
+ size = _ref5.size,
152
+ onHide = _ref5.onHide,
153
+ closeButton = _ref5.closeButton,
154
+ show = _ref5.show,
155
+ rest = _objectWithoutProperties(_ref5, _excluded2);
144
156
 
145
157
  return /*#__PURE__*/_react.default.createElement(Consumer, null, function (value) {
146
158
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(ModalHeader, rest, children, closeButton && /*#__PURE__*/_react.default.createElement(_iconStyles.BmIcons, _extends({
@@ -153,14 +165,19 @@ BmModal.Header = function (_ref4) {
153
165
  });
154
166
  };
155
167
 
156
- BmModal.Body = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n > *:not(:last-child) {\n margin-bottom: 0.5rem;\n }\n ", "\n"])), ''
157
- /* > * {
158
- display: flex;
159
- flex-direction: row;
160
- justify-content: space-between;
161
- width: 100%;
162
- } */
163
- );
168
+ BmModal.Body = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n > *:not(:last-child) {\n margin-bottom: 0.5rem;\n }\n max-height: ", ";\n overflow: auto;\n"])), function (_ref6) {
169
+ var size = _ref6.size;
170
+
171
+ if (size) {
172
+ if (size === "small") return "21.429rem";
173
+ if (size === "default") return "35.714rem";
174
+ if (size === "large") return "57.143rem";
175
+ if (size === "xlarge") return "81.429rem";
176
+ return size;
177
+ }
178
+
179
+ return "35.714rem";
180
+ });
164
181
  BmModal.Footer = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n"])));
165
182
  BmModal.propTypes = {
166
183
  size: _propTypes.default.string,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "beem-component",
3
- "version": "1.1.9",
3
+ "version": "1.2.3",
4
4
  "private": false,
5
5
  "main": "dist/components/index.js",
6
6
  "scripts": {
@@ -73,4 +73,4 @@
73
73
  "@storybook/theming": "^6.4.9",
74
74
  "storybook-addon-jsx": "^7.3.14"
75
75
  }
76
- }
76
+ }
package/src/App.js CHANGED
@@ -1,6 +1,6 @@
1
- import React from "react";
1
+ import React, { useState } from "react";
2
2
  import "../src/main.scss";
3
- import { MainWrapper } from "./lib/components";
3
+ import { BmButton, MainWrapper, BmModal } from "./lib/components";
4
4
  import { GlobalStyle } from "./lib/components/globalStyles";
5
5
  import "./lib/assets/css/sidebar.scss";
6
6
  import SideBar from "./SideBar";
@@ -10,10 +10,27 @@ import CustomerInfo from "./CustomerInfo";
10
10
  import InfoAccordion from "./InfoAccordion";
11
11
 
12
12
  export const App = () => {
13
+ const [showModal, setShowModal] = useState(false);
13
14
  return (
14
15
  <>
15
16
  <GlobalStyle />
16
17
  <MainWrapper>
18
+ <div>
19
+ <BmButton onClick={() => setShowModal(!showModal)}>
20
+ Click Me!
21
+ </BmButton>
22
+ </div>
23
+ <BmModal show={showModal} onHide={() => setShowModal(false)}>
24
+ <BmModal.Header closeButton>
25
+ <h2>Header</h2>
26
+ </BmModal.Header>
27
+ <BmModal.Body>
28
+ <p>This is a bodymdlkdmvlfdmvlkmvlkvmflkvmd;lkvmv;lkdmv;lmv;lfvm;lmre;mv;lkremvc;lkremvclfdmvlkfdmv;lkfdmv;lkfdmv;lfdmv;lfdmv;lfdmv;lfdmvlfd;mvlfd;vmfd;lvfdmlv</p>
29
+ </BmModal.Body>
30
+ <BmModal.Footer>
31
+ <p>This is a footer</p>
32
+ </BmModal.Footer>
33
+ </BmModal>
17
34
  <div className="main-chat-container">
18
35
  <div className="chat-container">
19
36
  <div className="sidebar">
package/src/Chat.js CHANGED
@@ -20,6 +20,50 @@ const Chat = () => {
20
20
  src={image}
21
21
  fileName={<p>attachment.jpg</p>}
22
22
  />
23
+ <BmChat.Details
24
+ state="outbound"
25
+ session="bot"
26
+ displayTime={<p>12:00pm</p>}
27
+ status="sent"
28
+ // src={image}
29
+ // fileName={<p>attachment.jpg</p>}
30
+ >
31
+ <p>Technical No Signal - Ili kupata chaneli au chaneli zifunguke kwa wakati ukilipia kifurushi, hakikisha kwanza kama unapata signal vizuri kutoka kwenye dish kwa kutumia remote control.
32
+ Bonyeza MENU, Bonyeza OK kwenye SEARCH, Bonyeza OK kwenye TP LIST.
33
+ Angalia asilimia ya QUALITY pale chini.
34
+ Angalia Transponder zote, 001, 002, 003 na 004 zinatakiwa ziwe na QUALITY si pungufu ya asilimia 60%.
35
+ Au kama una aina nyingine ya kisimbuzi;
36
+ Bonyeza MENU, Bonyeza OK kwenye SETTINGS, Bonyeza OK kwenye INSTALLATION, Bonyeza OK kwenye AUTOMATIC SEARCH.
37
+ Shuka kwenye frequency na uangalie frequency zote kuanzia 11044, 10981, 11106 na 10971.
38
+ Au
39
+ Bonyeza MENU, Bonyeza OK kwenye SETTINGS, Bonyeza OK kwenye INSTALLATION, kwenye EUTELSAT 7C bonyeza kitufe cha KIJANI.
40
+ Angalia QUALITY kwenye frequency zote kuanzia 11044, 10981, 11106 na 10971.
41
+ Angalia asilimia ya QUALITY pale chini.
42
+ QUALITY inatakiwa isiwe pungufu ya asilimia 60%.
43
+ Je, kwako inasoma ngapi? Kama ipo chini ya 60%, wasiliana na aliyekufungia dish arekebishe.</p>
44
+ </BmChat.Details>
45
+ <BmChat.Details
46
+ state="inbound"
47
+ session="bot"
48
+ displayTime={<p>12:00pm</p>}
49
+ status="sent"
50
+ // src={image}
51
+ // fileName={<p>attachment.jpg</p>}
52
+ >
53
+ <p>Technical No Signal - Ili kupata chaneli au chaneli zifunguke kwa wakati ukilipia kifurushi, hakikisha kwanza kama unapata signal vizuri kutoka kwenye dish kwa kutumia remote control.
54
+ Bonyeza MENU, Bonyeza OK kwenye SEARCH, Bonyeza OK kwenye TP LIST.
55
+ Angalia asilimia ya QUALITY pale chini.
56
+ Angalia Transponder zote, 001, 002, 003 na 004 zinatakiwa ziwe na QUALITY si pungufu ya asilimia 60%.
57
+ Au kama una aina nyingine ya kisimbuzi;
58
+ Bonyeza MENU, Bonyeza OK kwenye SETTINGS, Bonyeza OK kwenye INSTALLATION, Bonyeza OK kwenye AUTOMATIC SEARCH.
59
+ Shuka kwenye frequency na uangalie frequency zote kuanzia 11044, 10981, 11106 na 10971.
60
+ Au
61
+ Bonyeza MENU, Bonyeza OK kwenye SETTINGS, Bonyeza OK kwenye INSTALLATION, kwenye EUTELSAT 7C bonyeza kitufe cha KIJANI.
62
+ Angalia QUALITY kwenye frequency zote kuanzia 11044, 10981, 11106 na 10971.
63
+ Angalia asilimia ya QUALITY pale chini.
64
+ QUALITY inatakiwa isiwe pungufu ya asilimia 60%.
65
+ Je, kwako inasoma ngapi? Kama ipo chini ya 60%, wasiliana na aliyekufungia dish arekebishe.</p>
66
+ </BmChat.Details>
23
67
  <BmChat.Details
24
68
  state="outbound"
25
69
  session="live"
@@ -55,6 +55,7 @@
55
55
  max-height: 100%;
56
56
  flex-grow: 1;
57
57
  height: 100%;
58
+ width: fit-content;
58
59
  }
59
60
 
60
61
  .chat-menu {
@@ -104,4 +105,23 @@
104
105
 
105
106
  .chat-footer>*:not(:last-child) {
106
107
  margin-right: 0.5rem;
108
+ }
109
+
110
+ .quick-reply {
111
+ display: flex;
112
+ justify-content: center;
113
+ }
114
+
115
+ .label-color-picker {
116
+ display: flex;
117
+ flex-direction: row;
118
+ justify-content: flex-start !important;
119
+ }
120
+
121
+ .label-color-picker>* {
122
+ margin-right: 0.5rem;
123
+ }
124
+
125
+ .label-select {
126
+ width: 100%;
107
127
  }
@@ -2,7 +2,7 @@ import { Person } from "@material-ui/icons";
2
2
  import React from "react";
3
3
  import PropTypes from "prop-types";
4
4
  import styled from "styled-components";
5
- import { BmGrey100, BmPrimaryBlue, BmGrey400 } from "../colors";
5
+ import { BmGrey100, BmPrimaryBlue } from "../colors";
6
6
  import { BmAvatarIcon } from "../iconStyles";
7
7
  import SmartToyIcon from '@mui/icons-material/SmartToy';
8
8
 
@@ -28,9 +28,8 @@ export const BmAvatarWrapper = styled.div`
28
28
  }};
29
29
  background: ${({ user }) => {
30
30
  if (user === "chatbot") return `${BmPrimaryBlue}`;
31
- if (user === "employee") return `${BmGrey100}`;
32
- if (user === "default") return `${BmPrimaryBlue}`;
33
- return `${BmPrimaryBlue}`;
31
+ if (user === "employee") return `${BmPrimaryBlue}`;
32
+ return `${BmGrey100}`;
34
33
  }};
35
34
  border-radius: ${({ type }) => {
36
35
  if (type === "circle") return "7.143rem";
@@ -40,9 +39,8 @@ export const BmAvatarWrapper = styled.div`
40
39
  border: 0.071rem solid
41
40
  ${({ user }) => {
42
41
  if (user === "chatbot") return `${BmPrimaryBlue}`;
43
- if (user === "employee") return `${BmGrey400}`;
44
- if (user === "default") return `${BmPrimaryBlue}`;
45
- return `${BmPrimaryBlue}`;
42
+ if (user === "employee") return `${BmPrimaryBlue}`;
43
+ return `${BmGrey100}`;
46
44
  }};
47
45
  `;
48
46
 
@@ -21,7 +21,7 @@ export default {
21
21
  },
22
22
  user: {
23
23
  description:
24
- "Type of the Avatar ('chatbot', 'employee' or Material-UI icon)",
24
+ "Type of the Avatar ('chatbot', 'employee' or Material-UI icon), If not chatbot or employee, background color will be grey",
25
25
  defaultValue: { summary: undefined },
26
26
  },
27
27
  },
@@ -54,9 +54,10 @@ const Details = styled.div`
54
54
  const MessageDetails = styled.div`
55
55
  display: flex;
56
56
  flex-direction: column;
57
- max-width: 50%;
57
+ max-width: 70%;
58
58
  > * {
59
59
  margin-top: 0.5rem;
60
+ margin-bottom: 0.5rem;
60
61
  }
61
62
  `;
62
63
 
@@ -215,6 +216,12 @@ export const BmImageChat = ({ state, src, fileName, ...rest }) => {
215
216
  );
216
217
  };
217
218
 
219
+ export const MessageState = styled.div`
220
+ @media all and (max-width: 960px) {
221
+ display: none;
222
+ }
223
+ `;
224
+
218
225
  //End of Component for Images
219
226
 
220
227
  BmChat.Details = ({
@@ -228,10 +235,12 @@ BmChat.Details = ({
228
235
  fileName,
229
236
  ...rest
230
237
  }) => {
231
- console.log("bbbb", fileName);
232
238
  return (
233
239
  <Details state={state} {...rest}>
234
- {state === "inbound" && session && handleState({ state, session })}
240
+ {/* Adding for mobile */}
241
+ <MessageState>
242
+ {state === "inbound" && session && handleState({ state, session })}
243
+ </MessageState>
235
244
  <MessageDetails>
236
245
  {/* For Images */}
237
246
  {src && (
@@ -262,7 +271,9 @@ BmChat.Details = ({
262
271
  )}
263
272
  </MessagesSubDetails>
264
273
  </MessageDetails>
265
- {state === "outbound" && session && handleState({ state, session })}
274
+ <MessageState>
275
+ {state === "outbound" && session && handleState({ state, session })}
276
+ </MessageState>
266
277
  </Details>
267
278
  );
268
279
  };
@@ -34,6 +34,16 @@ export const ModalContent = styled.div`
34
34
  }
35
35
  return "35.714rem";
36
36
  }};
37
+ max-width: ${({ size }) => {
38
+ if (size) {
39
+ if (size === "small") return "21.429rem";
40
+ if (size === "default") return "35.714rem";
41
+ if (size === "large") return "57.143rem";
42
+ if (size === "xlarge") return "81.429rem";
43
+ return size;
44
+ }
45
+ return "35.714rem";
46
+ }};
37
47
  > *:not(:last-child) {
38
48
  margin-bottom: 1rem;
39
49
  }
@@ -50,7 +60,7 @@ export const ModalWrapper = styled.div`
50
60
  if (centered) {
51
61
  return "50%";
52
62
  }
53
- return "10%";
63
+ return "15%";
54
64
  }};
55
65
  left: 50%;
56
66
  transform: translate(-50%, -50%);
@@ -138,12 +148,17 @@ BmModal.Body = styled.div`
138
148
  > *:not(:last-child) {
139
149
  margin-bottom: 0.5rem;
140
150
  }
141
- ${'' /* > * {
142
- display: flex;
143
- flex-direction: row;
144
- justify-content: space-between;
145
- width: 100%;
146
- } */}
151
+ max-height: ${({ size }) => {
152
+ if (size) {
153
+ if (size === "small") return "21.429rem";
154
+ if (size === "default") return "35.714rem";
155
+ if (size === "large") return "57.143rem";
156
+ if (size === "xlarge") return "81.429rem";
157
+ return size;
158
+ }
159
+ return "35.714rem";
160
+ }};
161
+ overflow: auto;
147
162
  `;
148
163
 
149
164
  BmModal.Footer = styled.div`