-
Notifications
You must be signed in to change notification settings - Fork 10.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chore: Convert NotificationStatus to TS (#25125)
Co-authored-by: Guilherme Gazzo <guilhermegazzo@gmail.com>
- Loading branch information
1 parent
72bcf67
commit 154b241
Showing
7 changed files
with
27 additions
and
23 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
6 changes: 3 additions & 3 deletions
6
...ponents/Message/NotificationStatus/All.js → ...onents/Message/NotificationStatus/All.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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import React from 'react'; | ||
import React, { FC } from 'react'; | ||
|
||
import NotificationStatus from './NotificationStatus'; | ||
|
||
function All(props) { | ||
const All: FC = function All(props) { | ||
return <NotificationStatus label='mention-all' bg='#F38C39' {...props} />; | ||
} | ||
}; | ||
|
||
export default All; |
6 changes: 3 additions & 3 deletions
6
...mponents/Message/NotificationStatus/Me.js → ...ponents/Message/NotificationStatus/Me.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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import React from 'react'; | ||
import React, { FC } from 'react'; | ||
|
||
import NotificationStatus from './NotificationStatus'; | ||
|
||
function Me(props) { | ||
const Me: FC = function Me(props) { | ||
return <NotificationStatus label='Me' bg='danger-500' {...props} />; | ||
} | ||
}; | ||
|
||
export default Me; |
8 changes: 0 additions & 8 deletions
8
apps/meteor/client/components/Message/NotificationStatus/NotificationStatus.js
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
apps/meteor/client/components/Message/NotificationStatus/NotificationStatus.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,14 @@ | ||
import { Box } from '@rocket.chat/fuselage'; | ||
import React, { FC } from 'react'; | ||
|
||
import { TranslationKey, useTranslation } from '../../../contexts/TranslationContext'; | ||
|
||
const NotificationStatus: FC<{ | ||
label: TranslationKey; | ||
bg: string; | ||
}> = function NotificationStatus({ label, ...props }) { | ||
const t = useTranslation(); | ||
return <Box width='x8' aria-label={t(label)} borderRadius='full' height='x8' {...props} />; | ||
}; | ||
|
||
export default NotificationStatus; |
6 changes: 3 additions & 3 deletions
6
...ents/Message/NotificationStatus/Unread.js → ...nts/Message/NotificationStatus/Unread.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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import React from 'react'; | ||
import React, { FC } from 'react'; | ||
|
||
import NotificationStatus from './NotificationStatus'; | ||
|
||
function Unread(props) { | ||
const Unread: FC = function Unread(props) { | ||
return <NotificationStatus label='Unread' bg='primary-500' {...props} />; | ||
} | ||
}; | ||
|
||
export default Unread; |
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