Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagoevanp committed Mar 24, 2022
1 parent e2b83fb commit 82e14b6
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 51 deletions.
18 changes: 0 additions & 18 deletions client/components/voip/composer/NotAvailable.stories.tsx

This file was deleted.

10 changes: 0 additions & 10 deletions client/components/voip/composer/NotAvailable.tsx

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { Story } from '@storybook/react';
import React from 'react';

import NotAvailableOnCall from './NotAvailableOnCall';

export const Default: Story = () => <NotAvailableOnCall />;

export default {
title: 'components/Composer/NotAvailableOnCall',
component: NotAvailableOnCall,
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ type ContentPropsType = {
text: string;
};

const Content = ({ icon, text }: ContentPropsType): ReactElement => (
const NotAvailableContent = ({ icon, text }: ContentPropsType): ReactElement => (
<Box w='full' h='full' display='flex' flexDirection='row' alignItems='center' justifyContent='center'>
<Icon color='info' size='24px' name={icon} />
<Box mis='4px' fontScale='p2' color='info'>
Expand All @@ -15,4 +15,4 @@ const Content = ({ icon, text }: ContentPropsType): ReactElement => (
</Box>
);

export default Content;
export default NotAvailableContent;
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { Box } from '@rocket.chat/fuselage';
import React, { ReactElement } from 'react';

type NotAvailableProps = {
children: ReactElement;
};

const NotAvailableContentWrapper = (props: NotAvailableProps): ReactElement => (
<Box w='full' h='full' backgroundColor='neutral-100' {...props} />
);

export default NotAvailableContentWrapper;
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Box } from '@rocket.chat/fuselage';
import React, { ReactElement } from 'react';

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>
);

export default NotAvailableOnCall;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from './NotAvailableOnCall';
6 changes: 0 additions & 6 deletions client/components/voip/composer/index.ts

This file was deleted.

14 changes: 0 additions & 14 deletions client/components/voip/composer/template.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion client/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,6 @@ createTemplateForComponent('roomNotFound', () => import('./views/room/Room/RoomN
renderContainerView: () => HTML.DIV({ style: 'height: 100%;' }),
});

createTemplateForComponent('ComposerNotAvailablePhoneCalls', () => import('./components/voip/composer/template'), {
createTemplateForComponent('ComposerNotAvailablePhoneCalls', () => import('./components/voip/composer/NotAvailableOnCall'), {
renderContainerView: () => HTML.DIV({ style: 'display: flex; height: 100%; width: 100%' }),
});

0 comments on commit 82e14b6

Please sign in to comment.