Skip to content

Commit 2e780c4

Browse files
react chat ui kit demo is updated: SDK v2.19.2, react kit v0.4.5
1 parent 4295352 commit 2e780c4

File tree

11 files changed

+358
-556
lines changed

11 files changed

+358
-556
lines changed

samples/react-chat-ui-kit-demo-app/package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

samples/react-chat-ui-kit-demo-app/package.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,16 @@
55
"dependencies": {
66
"@emotion/react": "^11.11.0",
77
"@emotion/styled": "^11.11.0",
8-
"@mui/icons-material": "^5.11.16",
9-
"@mui/material": "^5.13.3",
10-
"@mui/styled-engine-sc": "^5.12.0",
118
"@types/node": "^16.18.28",
129
"@types/react": "^18.2.6",
1310
"@types/react-dom": "^18.2.4",
14-
"node-sass": "^8.0.0",
15-
"quickblox": "2.19.1",
16-
"quickblox-react-ui-kit": "0.4.0",
11+
"quickblox": "2.19.2",
12+
"quickblox-react-ui-kit": "^0.4.5",
1713
"react": "^17.0.0 || ^18.0.0",
1814
"react-dom": "^17.0.0 || ^18.0.0",
1915
"react-router-dom": "^6.4.3",
2016
"react-scripts": "5.0.1",
17+
"sass": "^1.84.0",
2118
"styled-components": "^5.3.11",
2219
"typescript": "^4.9.5",
2320
"web-vitals": "^2.1.4"

samples/react-chat-ui-kit-demo-app/src/App.scss

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,14 @@
55
margin: 10px;
66
padding-left: 10px;
77
display: flex;
8-
flex-flow: row nowrap;
8+
flex-flow: row wrap;
99
gap: 10px;
10+
11+
button {
12+
width: 200px;
13+
height: 20px;
14+
max-width: 200px;
15+
}
1016
}
1117

1218
body{
@@ -19,3 +25,16 @@ body{
1925
overflow: hidden !important;
2026
scrollbar-width: none !important;
2127
}
28+
29+
@media (max-width: 768px) {
30+
.main-buttons-wrapper {
31+
button {
32+
width: 100px;
33+
height: 20px;
34+
max-width: 100px;
35+
36+
padding: 0;
37+
margin: 0;
38+
}
39+
}
40+
}

samples/react-chat-ui-kit-demo-app/src/App.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,6 @@ function App() {
197197
qbConfig={{...QBConfig}}
198198
>
199199
<div>
200-
201200
<Routes>
202201
<Route
203202
path="/" element={
@@ -208,23 +207,20 @@ function App() {
208207
<MainButton
209208
typeButton={TypeButton.outlined}
210209
title="Light Theme"
211-
styleBox={{width: "200px", height: "20px"}}
212210
clickHandler = {() => {
213211
document.documentElement.setAttribute('data-theme', 'light');
214212
}}
215213
/>
216214
<MainButton
217215
typeButton={TypeButton.defaultDisabled}
218216
title="Dark Theme"
219-
styleBox={{width: "200px", height: "20px"}}
220217
clickHandler = {() => {
221218
document.documentElement.setAttribute('data-theme', 'dark');
222219
}}
223220
/>
224221
<MainButton
225222
typeButton={TypeButton.danger}
226223
title="Log Out"
227-
styleBox={{width: "200px", height: "20px"}}
228224
clickHandler = { logoutUIKitHandler }
229225
/>
230226
</div>

samples/react-chat-ui-kit-demo-app/src/QBconfig.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ export const QBConfig: QBUIKitConfig = {
128128
debug: true,
129129
enableForwarding: true,
130130
enableReplying: true,
131-
regexUserName: '^(?=[a-zA-Z])[-a-zA-Z_ ]{3,49}(?<! )$',
131+
// regexUserName: '^(?=[a-zA-Z])[-a-zA-Z_ ]{3,49}(?<! )$',
132+
regexUserName: '',
132133
endpoints: {
133134
api: 'api.quickblox.com',
134135
chat: 'chat.quickblox.com',
Lines changed: 72 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,75 @@
1-
.main-container{
2-
width:100%;
1+
.container {
2+
flex: 1;
3+
display: flex;
4+
justify-content: center;
5+
align-items: center;
6+
padding: 20px;
7+
min-width: 300px;
8+
width: 300px;
9+
}
10+
.login-form {
11+
width: 100%;
12+
border: 1px solid #D9E3F7;
13+
border-radius: 10px;
14+
text-align: center;
15+
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
16+
padding: 20px;
17+
}
18+
.login-form-title {
19+
display: flex;
20+
flex-flow: column;
21+
justify-content: flex-start;
22+
align-items: flex-start;
23+
}
24+
.login-form-content {
25+
display: flex;
26+
flex-flow: column;
27+
justify-content: flex-start;
28+
align-items: flex-start;
29+
padding-right: 20px;
30+
padding-bottom: 20px;
31+
32+
.text-field {
33+
box-sizing: border-box;
34+
width: 250px;
35+
}
36+
37+
.error {
38+
max-width: 250px;
39+
color: red;
40+
font-size: x-small;
41+
margin: 0;
42+
}
43+
}
44+
.theme-switch {
45+
display: flex;
46+
justify-content: space-between;
47+
padding-top: 10px;
48+
gap: 5px;
349
}
450

5-
.form-col{
6-
border: 10px solid #0275d8;
7-
border-radius: .5rem;
8-
padding:3%;
51+
.login-form-btn {
52+
display: flex;
53+
flex-flow: column;
54+
justify-content: center;
55+
align-items: center;
56+
}
57+
.login-form h2 {
58+
margin-bottom: 10px;
59+
font-size: 22px;
60+
}
61+
.login-form h3 {
62+
margin-bottom: 10px;
63+
color: #3978FC;
64+
}
65+
.login-form p {
66+
margin-bottom: 20px;
67+
font-size: 14px;
68+
}
69+
.login-form a {
70+
color: #3978FC;
71+
text-decoration: none;
72+
}
73+
.login-form button:hover {
74+
background: #255ec7;
975
}

0 commit comments

Comments
 (0)