-
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.
Remove usage of Usercard.Username component from omnichannel components
- Loading branch information
Showing
5 changed files
with
58 additions
and
32 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
apps/meteor/client/components/Omnichannel/AgentOrContactCardUsername.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,31 @@ | ||
import { Box } from '@rocket.chat/fuselage'; | ||
import React, { ReactElement, ReactNode, ComponentProps } from 'react'; | ||
|
||
import * as UserStatus from '../UserStatus'; | ||
|
||
type AgentOrContactCardUsernameProps = ComponentProps<typeof Box> & { | ||
name: ReactNode; | ||
status: ReactNode; | ||
}; | ||
|
||
const AgentOrContactCardUsername = ({ name, status = <UserStatus.Offline />, ...props }: AgentOrContactCardUsernameProps): ReactElement => ( | ||
<Box | ||
display='flex' | ||
title={name} | ||
flexGrow={0} | ||
flexShrink={1} | ||
flexBasis={0} | ||
alignItems='center' | ||
fontScale='h4' | ||
color='default' | ||
withTruncatedText | ||
{...props} | ||
> | ||
{status}{' '} | ||
<Box mis='x8' flexGrow={1} withTruncatedText> | ||
{name} | ||
</Box> | ||
</Box> | ||
); | ||
|
||
export default AgentOrContactCardUsername; |
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
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
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
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