beem-component 1.2.0 → 1.2.4

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.
@@ -0,0 +1,42 @@
1
+ $breakpoints: ( xs: 0, sm: 480px, md: 720px, lg: 960px, xl: 1200px, xxl: 1400px);
2
+ @mixin xs {
3
+ @media (min-width: map-get($breakpoints, 'xs')) {
4
+ @content;
5
+ }
6
+ }
7
+
8
+ @mixin sm {
9
+ @media (min-width: map-get($breakpoints, 'sm')) {
10
+ @content;
11
+ }
12
+ }
13
+
14
+ @mixin md {
15
+ @media (min-width: map-get($breakpoints, 'md')) {
16
+ @content;
17
+ }
18
+ }
19
+
20
+ @mixin lg {
21
+ @media (min-width: map-get($breakpoints, 'lg')) {
22
+ @content;
23
+ }
24
+ }
25
+
26
+ @mixin xl {
27
+ @media (min-width: map-get($breakpoints, 'xl')) {
28
+ @content;
29
+ }
30
+ }
31
+
32
+ @mixin xxl {
33
+ @media (min-width: map-get($breakpoints, 'xxl')) {
34
+ @content;
35
+ }
36
+ }
37
+
38
+ @mixin breakpoint($bp: 0) {
39
+ @media (min-width: $bp) {
40
+ @content;
41
+ }
42
+ }
@@ -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 {
@@ -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
 
@@ -41,11 +41,9 @@ var BmChat = _styledComponents.default.div(_templateObject || (_templateObject =
41
41
  /* border: 0.071rem solid ${BmGrey400}; */
42
42
  );
43
43
 
44
- BmChat.Body = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n padding: 0rem 1.5rem;\n flex-grow: 1;\n overflow: auto;\n"])));
44
+ BmChat.Body = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column-reverse;\n padding: 0rem 1.5rem;\n flex-grow: 1;\n overflow: auto;\n height: 100%;\n"])));
45
45
 
46
- var Details = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n ", "\n justify-content: ", ";\n > *:not(:last-child) {\n margin-right: 1rem;\n margin-bottom: 0.5rem;\n }\n overflow-wrap: break-word !important;\n word-wrap: break-word !important;\n margin: 0rem;\n flex-grow: 1;\n"])), ""
47
- /* align-items: center; */
48
- , function (_ref) {
46
+ var Details = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: ", ";\n > *:not(:last-child) {\n margin-right: 1rem;\n margin-bottom: 0.5rem;\n }\n overflow-wrap: break-word !important;\n word-wrap: break-word !important;\n margin: 0rem;\n flex-grow: 1;\n"])), function (_ref) {
49
47
  var state = _ref.state;
50
48
 
51
49
  if (state === "inbound") {
@@ -59,7 +57,7 @@ var Details = _styledComponents.default.div(_templateObject3 || (_templateObject
59
57
  return "row";
60
58
  });
61
59
 
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"])));
60
+ 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
61
 
64
62
  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
63
  var state = _ref2.state;
@@ -214,11 +212,15 @@ var BmImageChat = function BmImageChat(_ref13) {
214
212
  file: src,
215
213
  fileName: fileName
216
214
  }, rest))));
217
- }; //End of Component for Images
218
-
215
+ };
219
216
 
220
217
  exports.BmImageChat = BmImageChat;
221
218
 
219
+ 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
220
+
221
+
222
+ exports.MessageState = MessageState;
223
+
222
224
  BmChat.Details = function (_ref14) {
223
225
  var children = _ref14.children,
224
226
  state = _ref14.state,
@@ -230,13 +232,12 @@ BmChat.Details = function (_ref14) {
230
232
  fileName = _ref14.fileName,
231
233
  rest = _objectWithoutProperties(_ref14, _excluded3);
232
234
 
233
- console.log("bbbb", fileName);
234
235
  return /*#__PURE__*/_react.default.createElement(Details, _extends({
235
236
  state: state
236
- }, rest), state === "inbound" && session && handleState({
237
+ }, rest), /*#__PURE__*/_react.default.createElement(MessageState, null, state === "inbound" && session && handleState({
237
238
  state: state,
238
239
  session: session
239
- }), /*#__PURE__*/_react.default.createElement(MessageDetails, null, src && /*#__PURE__*/_react.default.createElement(BmImageChat, _extends({
240
+ })), /*#__PURE__*/_react.default.createElement(MessageDetails, null, src && /*#__PURE__*/_react.default.createElement(BmImageChat, _extends({
240
241
  state: state,
241
242
  src: src,
242
243
  fileName: fileName
@@ -254,12 +255,12 @@ BmChat.Details = function (_ref14) {
254
255
  icon: /*#__PURE__*/_react.default.createElement(_icons.Done, null),
255
256
  color: "".concat(_colors.BmPrimaryBlack),
256
257
  size: "small"
257
- }))), state === "outbound" && session && handleState({
258
+ }))), /*#__PURE__*/_react.default.createElement(MessageState, null, state === "outbound" && session && handleState({
258
259
  state: state,
259
260
  session: session
260
- }));
261
+ })));
261
262
  };
262
263
 
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"])));
264
+ 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
265
  var _default = BmChat;
265
266
  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.2.0",
3
+ "version": "1.2.4",
4
4
  "private": false,
5
5
  "main": "dist/components/index.js",
6
6
  "scripts": {
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"
@@ -0,0 +1,42 @@
1
+ $breakpoints: ( xs: 0, sm: 480px, md: 720px, lg: 960px, xl: 1200px, xxl: 1400px);
2
+ @mixin xs {
3
+ @media (min-width: map-get($breakpoints, 'xs')) {
4
+ @content;
5
+ }
6
+ }
7
+
8
+ @mixin sm {
9
+ @media (min-width: map-get($breakpoints, 'sm')) {
10
+ @content;
11
+ }
12
+ }
13
+
14
+ @mixin md {
15
+ @media (min-width: map-get($breakpoints, 'md')) {
16
+ @content;
17
+ }
18
+ }
19
+
20
+ @mixin lg {
21
+ @media (min-width: map-get($breakpoints, 'lg')) {
22
+ @content;
23
+ }
24
+ }
25
+
26
+ @mixin xl {
27
+ @media (min-width: map-get($breakpoints, 'xl')) {
28
+ @content;
29
+ }
30
+ }
31
+
32
+ @mixin xxl {
33
+ @media (min-width: map-get($breakpoints, 'xxl')) {
34
+ @content;
35
+ }
36
+ }
37
+
38
+ @mixin breakpoint($bp: 0) {
39
+ @media (min-width: $bp) {
40
+ @content;
41
+ }
42
+ }
@@ -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 {
@@ -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
 
@@ -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
  },
@@ -23,15 +23,15 @@ const BmChat = styled.div`
23
23
 
24
24
  BmChat.Body = styled.div`
25
25
  display: flex;
26
- flex-direction: column;
26
+ flex-direction: column-reverse;
27
27
  padding: 0rem 1.5rem;
28
28
  flex-grow: 1;
29
29
  overflow: auto;
30
+ height: 100%;
30
31
  `;
31
32
 
32
33
  const Details = styled.div`
33
34
  display: flex;
34
- ${"" /* align-items: center; */}
35
35
  justify-content: ${({ state }) => {
36
36
  if (state === "inbound") {
37
37
  return "flex-start";
@@ -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`