-
Notifications
You must be signed in to change notification settings - Fork 11k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Regression: Extension List panel UI not aligned with designs (#24645)
- Loading branch information
Showing
7 changed files
with
57 additions
and
8 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
client/views/admin/settings/groups/voip/AssignAgentButton.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 { Table, Icon, Button } from '@rocket.chat/fuselage'; | ||
import { useMutableCallback } from '@rocket.chat/fuselage-hooks'; | ||
import React, { FC } from 'react'; | ||
|
||
import { useSetModal } from '../../../../../contexts/ModalContext'; | ||
import { useTranslation } from '../../../../../contexts/TranslationContext'; | ||
import AssignAgentModal from './AssignAgentModal'; | ||
|
||
const AssignAgentButton: FC<{ extension: string; reload: () => void }> = ({ extension, reload }) => { | ||
const t = useTranslation(); | ||
const setModal = useSetModal(); | ||
|
||
const handleAssociation = useMutableCallback((e) => { | ||
e.stopPropagation(); | ||
setModal(<AssignAgentModal existingExtension={extension} closeModal={(): void => setModal()} reload={reload} />); | ||
}); | ||
|
||
return ( | ||
<Table.Cell fontScale='p2' color='hint' withTruncatedText> | ||
<Button small ghost title={t('Associate_Agent')} onClick={handleAssociation}> | ||
<Icon name='user-plus' size='x20' mie='x4' /> | ||
</Button> | ||
</Table.Cell> | ||
); | ||
}; | ||
|
||
export default AssignAgentButton; |
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
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