-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
103 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 0 additions & 16 deletions
16
apps/meteor/client/components/message/MessageBodyRender/OrderedList.tsx
This file was deleted.
Oops, something went wrong.
23 changes: 0 additions & 23 deletions
23
apps/meteor/client/components/message/MessageBodyRender/TaskList.tsx
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
apps/meteor/client/components/message/MessageBodyRender/UnorderedList.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
apps/meteor/client/components/message/MessageBodyRender/blocks/OrderedListBlock.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import * as MessageParser from '@rocket.chat/message-parser'; | ||
import React, { ReactElement } from 'react'; | ||
|
||
import Inline from '../Inline'; | ||
|
||
type OrderedListBlockProps = { | ||
items: MessageParser.ListItem[]; | ||
}; | ||
|
||
const OrderedListBlock = ({ items }: OrderedListBlockProps): ReactElement => ( | ||
<ol> | ||
{items.map(({ value, number }, index) => ( | ||
<li key={index} value={Number(number)}> | ||
<Inline value={value} /> | ||
</li> | ||
))} | ||
</ol> | ||
); | ||
|
||
export default OrderedListBlock; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
apps/meteor/client/components/message/MessageBodyRender/blocks/TaskListBlock.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { CheckBox } from '@rocket.chat/fuselage'; | ||
import * as MessageParser from '@rocket.chat/message-parser'; | ||
import React, { ReactElement } from 'react'; | ||
|
||
import Inline from '../Inline'; | ||
|
||
type TaskListBlockProps = { | ||
tasks: MessageParser.Task[]; | ||
}; | ||
|
||
const TaksListBlock = ({ tasks }: TaskListBlockProps): ReactElement => ( | ||
<ul | ||
style={{ | ||
listStyle: 'none', | ||
marginLeft: 0, | ||
paddingLeft: 0, | ||
}} | ||
> | ||
{tasks.map((item, index) => ( | ||
<li> | ||
<CheckBox key={index} checked={item.status} /> <Inline value={item.value} /> | ||
</li> | ||
))} | ||
</ul> | ||
); | ||
|
||
export default TaksListBlock; |
20 changes: 20 additions & 0 deletions
20
apps/meteor/client/components/message/MessageBodyRender/blocks/UnorderedListBlock.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import * as MessageParser from '@rocket.chat/message-parser'; | ||
import React, { ReactElement } from 'react'; | ||
|
||
import Inline from '../Inline'; | ||
|
||
type UnorderedListBlockProps = { | ||
items: MessageParser.ListItem[]; | ||
}; | ||
|
||
const UnorderedListBlock = ({ items }: UnorderedListBlockProps): ReactElement => ( | ||
<ul> | ||
{items.map((item, index) => ( | ||
<li key={index}> | ||
<Inline value={item.value} /> | ||
</li> | ||
))} | ||
</ul> | ||
); | ||
|
||
export default UnorderedListBlock; |