mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-26 03:18:17 +01:00
Move to react for newlines, emoji, and links in message body
This commit is contained in:
59
ts/components/conversation/MessageBody.md
Normal file
59
ts/components/conversation/MessageBody.md
Normal file
@@ -0,0 +1,59 @@
|
||||
### Plain text
|
||||
|
||||
```jsx
|
||||
<MessageBody text="Plain text message" />
|
||||
```
|
||||
|
||||
```jsx
|
||||
<MessageBody text="Plain text message\n\nWith a new line." />
|
||||
```
|
||||
|
||||
### Jumbo emoji
|
||||
|
||||
```jsx
|
||||
<MessageBody text="🔥" />
|
||||
```
|
||||
|
||||
```jsx
|
||||
<MessageBody text="🔥🔥" />
|
||||
```
|
||||
|
||||
```jsx
|
||||
<MessageBody text="🔥🔥🔥🔥" />
|
||||
```
|
||||
|
||||
```jsx
|
||||
<MessageBody text="🔥🔥🔥🔥🔥🔥🔥🔥" />
|
||||
```
|
||||
|
||||
```jsx
|
||||
<MessageBody text="🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥" />
|
||||
```
|
||||
|
||||
### Text and emoji
|
||||
|
||||
```jsx
|
||||
<MessageBody text="Plain text 🔥message. With 🔥emoji🔥 sprinkled 🔥about" />
|
||||
```
|
||||
|
||||
```jsx
|
||||
<MessageBody text="🔥Message starting and ending with emoji🔥" />
|
||||
```
|
||||
|
||||
### Links
|
||||
|
||||
```jsx
|
||||
<MessageBody text="This before and after link. Before. https://somewhere.com After." />
|
||||
```
|
||||
|
||||
```jsx
|
||||
<MessageBody text="Link https://somewhere.com\nWhat do you think? How about this one? \n\nhttps://anotherlink.com" />
|
||||
```
|
||||
|
||||
```jsx
|
||||
<MessageBody text="Link https://somewhere.com\nWhat do you think? How about this one? \n\nhttps://anotherlink.com" />
|
||||
```
|
||||
|
||||
```jsx
|
||||
<MessageBody text="should not render as link:\nmailto:someone@somewhere.com\nftp://something.com\n//local/share\n\\local\share\n\nshould render as link:\ngithub.com\nhttps://blah.com" />
|
||||
```
|
||||
Reference in New Issue
Block a user