@webinex/chatify 1.0.0-alpha03 → 1.0.0-alpha05

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.
@@ -62,7 +62,8 @@
62
62
  padding-right: 30%;
63
63
  }
64
64
 
65
- .wxchtf-message {
65
+ .wxchtf-message,
66
+ .wxchtf-sending-message {
66
67
  display: flex;
67
68
  flex-flow: row nowrap;
68
69
  width: 100%;
@@ -81,7 +82,8 @@
81
82
  margin-left: 15px;
82
83
  }
83
84
 
84
- .wxchtf-message-body {
85
+ .wxchtf-message-body,
86
+ .wxchtf-sending-message-body {
85
87
  direction: ltr;
86
88
  border-bottom-left-radius: 10px;
87
89
  border-bottom-right-radius: 0;
@@ -98,7 +100,8 @@
98
100
  }
99
101
  }
100
102
 
101
- .wxchtf-message-body {
103
+ .wxchtf-message-body,
104
+ .wxchtf-sending-message-body {
102
105
  min-width: 300px;
103
106
  max-width: 70%;
104
107
  border-radius: $messageBorderRadius;
@@ -111,12 +114,13 @@
111
114
  white-space: pre-wrap;
112
115
  overflow-wrap: break-word;
113
116
 
114
- .wxchtf-message-info-box {
117
+ .wxchtf-message-info-box,
118
+ .wxchtf-sending-message-info-box {
115
119
  text-align: right;
116
120
 
117
121
  .wxchtf-message-sent-at,
118
122
  .wxchtf-message-read-box,
119
- .wxchtf-message-sending-box {
123
+ .wxchtf-sending-message-sending-box {
120
124
  display: inline-block;
121
125
  font-style: italic;
122
126
  font-size: 0.75em;
@@ -125,7 +129,7 @@
125
129
  }
126
130
 
127
131
  .wxchtf-message-read-box,
128
- .wxchtf-message-sending-box {
132
+ .wxchtf-sending-message-sending-box {
129
133
  margin-left: 5px;
130
134
  }
131
135
  }
@@ -150,6 +154,7 @@
150
154
  }
151
155
 
152
156
  .wxchtf-message,
157
+ .wxchtf-sending-message,
153
158
  .wxchtf-system-message,
154
159
  .wxchtf-message-skeleton {
155
160
  margin-bottom: 2rem;
@@ -1,13 +0,0 @@
1
- import { Account, File } from '../core';
2
- import React from 'react';
3
- export interface MessageMdProps {
4
- author?: Account;
5
- text: string;
6
- files: File[];
7
- my: boolean;
8
- read?: boolean;
9
- sending?: boolean;
10
- reading?: boolean;
11
- timestamp: string;
12
- }
13
- export declare const MessageMd: React.ForwardRefExoticComponent<MessageMdProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,13 +0,0 @@
1
- import { Account, File } from '../core';
2
- import React from 'react';
3
- export interface MessageMdProps {
4
- author?: Account;
5
- text: string;
6
- files: File[];
7
- my: boolean;
8
- read?: boolean;
9
- sending?: boolean;
10
- reading?: boolean;
11
- timestamp: string;
12
- }
13
- export declare const MessageMd: React.ForwardRefExoticComponent<MessageMdProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,47 +0,0 @@
1
- import { Account, File } from '../core';
2
- import { Avatar } from './Avatar';
3
- import { useLocalizer } from './localizer';
4
- import React from 'react';
5
-
6
- export interface MessageMdProps {
7
- author?: Account;
8
- text: string;
9
- files: File[];
10
- my: boolean;
11
- read?: boolean;
12
- sending?: boolean;
13
- reading?: boolean;
14
- timestamp: string;
15
- }
16
-
17
- export const MessageMd = React.forwardRef(
18
- (props: MessageMdProps, forwardRef: React.ForwardedRef<HTMLDivElement>) => {
19
- const { author, text, my, read, reading, sending, timestamp } = props;
20
- const localizer = useLocalizer();
21
-
22
- return (
23
- <div
24
- ref={forwardRef}
25
- className={'wxchtf-message' + (my ? ' --my' : '') + (sending ? ' --sending' : '')}
26
- >
27
- {author && (
28
- <div className="wxchtf-message-author">
29
- <Avatar account={author} />
30
- </div>
31
- )}
32
- <div className="wxchtf-message-body">
33
- <div className="wxchtf-message-text">{text}</div>
34
- <div className="wxchtf-message-info-box">
35
- <div className="wxchtf-message-sent-at">{localizer.timestamp(timestamp)}</div>
36
- {read !== undefined && !my && (
37
- <div className="wxchtf-message-read-box">
38
- {reading ? localizer.message.reading() : localizer.message.read()}
39
- </div>
40
- )}
41
- {sending && <div className="wxchtf-message-sending-box">{localizer.message.sending()}</div>}
42
- </div>
43
- </div>
44
- </div>
45
- );
46
- },
47
- );