Add friend request close button

This commit is contained in:
Bill 2022-03-16 14:52:05 -04:00
parent d3ebc259dc
commit 7546479fab

View File

@ -1,3 +1,4 @@
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { FC } from 'react'; import { FC } from 'react';
import { LocalizeText, RoomWidgetFriendRequestMessage } from '../../../../api'; import { LocalizeText, RoomWidgetFriendRequestMessage } from '../../../../api';
import { Base, Button, Column, Flex, Text } from '../../../../common'; import { Base, Button, Column, Flex, Text } from '../../../../common';
@ -28,7 +29,10 @@ export const FriendRequestDialogView: FC<FriendRequestDialogViewProps> = props =
<UserLocationView userId={ userId }> <UserLocationView userId={ userId }>
<Base className="nitro-friend-request-dialog nitro-context-menu p-2"> <Base className="nitro-friend-request-dialog nitro-context-menu p-2">
<Column> <Column>
<Flex alignItems="center" justifyContent="between" gap={ 2 }>
<Text variant="white" fontSize={ 6 }>{ LocalizeText('widget.friendrequest.from', [ 'username' ], [ userName ]) }</Text> <Text variant="white" fontSize={ 6 }>{ LocalizeText('widget.friendrequest.from', [ 'username' ], [ userName ]) }</Text>
<FontAwesomeIcon icon="times" className="cursor-pointer" onClick={ close } />
</Flex>
<Flex justifyContent="end" gap={ 1 }> <Flex justifyContent="end" gap={ 1 }>
<Button variant="danger" onClick={ event => respond(false) }>{ LocalizeText('widget.friendrequest.decline') }</Button> <Button variant="danger" onClick={ event => respond(false) }>{ LocalizeText('widget.friendrequest.decline') }</Button>
<Button variant="success" onClick={ event => respond(true) }>{ LocalizeText('widget.friendrequest.accept') }</Button> <Button variant="success" onClick={ event => respond(true) }>{ LocalizeText('widget.friendrequest.accept') }</Button>