-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
1 parent
82e14b6
commit 4113ffb
Showing
2 changed files
with
20 additions
and
10 deletions.
There are no files selected for viewing
11 changes: 8 additions & 3 deletions
11
client/components/voip/composer/NotAvailableOnCall/NotAvailable.stories.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,11 +1,16 @@ | ||
import { Story } from '@storybook/react'; | ||
import React from 'react'; | ||
|
||
import NotAvailableOnCall from './NotAvailableOnCall'; | ||
import NotAvailableContent from './NotAvailableContent'; | ||
import NotAvailableContentWrapper from './NotAvailableContentWrapper'; | ||
|
||
export const Default: Story = () => <NotAvailableOnCall />; | ||
export const Default: Story = () => ( | ||
<NotAvailableContentWrapper> | ||
<NotAvailableContent text='Messages are not available on phone calls' icon='message' /> | ||
</NotAvailableContentWrapper> | ||
); | ||
|
||
export default { | ||
title: 'components/Composer/NotAvailableOnCall', | ||
component: NotAvailableOnCall, | ||
component: Default, | ||
}; |
19 changes: 12 additions & 7 deletions
19
client/components/voip/composer/NotAvailableOnCall/NotAvailableOnCall.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,15 +1,20 @@ | ||
import { Box } from '@rocket.chat/fuselage'; | ||
import React, { ReactElement } from 'react'; | ||
|
||
import { useTranslation } from '../../../../contexts/TranslationContext'; | ||
import NotAvailableContent from './NotAvailableContent'; | ||
import NotAvailableContentWrapper from './NotAvailableContentWrapper'; | ||
|
||
const NotAvailableOnCall = (): ReactElement => ( | ||
<Box h='44px' w='100%' borderColor='disabled' borderWidth='2px'> | ||
<NotAvailableContentWrapper> | ||
<NotAvailableContent icon='message' text='Composer_not_available_phone_calls' /> | ||
</NotAvailableContentWrapper> | ||
</Box> | ||
); | ||
const NotAvailableOnCall = (): ReactElement => { | ||
const t = useTranslation(); | ||
|
||
return ( | ||
<Box h='44px' w='100%' borderColor='disabled' borderWidth='2px'> | ||
<NotAvailableContentWrapper> | ||
<NotAvailableContent icon='message' text={t('Composer_not_available_phone_calls')} /> | ||
</NotAvailableContentWrapper> | ||
</Box> | ||
); | ||
}; | ||
|
||
export default NotAvailableOnCall; |