@rpg-engine/long-bow 0.3.27 → 0.3.29
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/dist/long-bow.cjs.development.js +6 -4
- package/dist/long-bow.cjs.development.js.map +1 -1
- package/dist/long-bow.cjs.production.min.js +1 -1
- package/dist/long-bow.cjs.production.min.js.map +1 -1
- package/dist/long-bow.esm.js +6 -4
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Chat/Chat.tsx +7 -4
package/package.json
CHANGED
|
@@ -30,7 +30,7 @@ export const Chat: React.FC<IChatProps> = ({
|
|
|
30
30
|
chatMessages,
|
|
31
31
|
onSendChatMessage,
|
|
32
32
|
width = '80%',
|
|
33
|
-
height = '
|
|
33
|
+
height = 'auto',
|
|
34
34
|
onFocus,
|
|
35
35
|
onBlur,
|
|
36
36
|
color = '#c65102',
|
|
@@ -88,7 +88,7 @@ export const Chat: React.FC<IChatProps> = ({
|
|
|
88
88
|
return (
|
|
89
89
|
<ChatContainer width={width} height={height}>
|
|
90
90
|
<ErrorBoundary fallback={<p>Oops! Your chat has crashed.</p>}>
|
|
91
|
-
<MessagesContainer>
|
|
91
|
+
<MessagesContainer className="chat-body">
|
|
92
92
|
{onRenderChatMessages(chatMessages)}
|
|
93
93
|
</MessagesContainer>
|
|
94
94
|
|
|
@@ -139,8 +139,8 @@ const ChatContainer = styled.div<IContainerProps>`
|
|
|
139
139
|
height: ${props => props.height};
|
|
140
140
|
width: ${({ width }) => width};
|
|
141
141
|
padding: 10px;
|
|
142
|
-
margin-top: 100px;
|
|
143
142
|
background-color: rgba(0, 0, 0, 0.2);
|
|
143
|
+
height: auto;
|
|
144
144
|
`;
|
|
145
145
|
|
|
146
146
|
const TextField = styled.input`
|
|
@@ -151,9 +151,12 @@ const TextField = styled.input`
|
|
|
151
151
|
`;
|
|
152
152
|
|
|
153
153
|
const MessagesContainer = styled.div`
|
|
154
|
-
overflow-y: scroll;
|
|
155
154
|
height: 70%;
|
|
156
155
|
margin-bottom: 10px;
|
|
156
|
+
.chat-body {
|
|
157
|
+
max-height: auto;
|
|
158
|
+
overflow-y: auto;
|
|
159
|
+
}
|
|
157
160
|
`;
|
|
158
161
|
|
|
159
162
|
const Message = styled.div<IMessageProps>`
|