diff --git a/src/view/com/util/AccountDropdownBtn.tsx b/src/view/com/util/AccountDropdownBtn.tsx index 034fbfc6..fa2553d3 100644 --- a/src/view/com/util/AccountDropdownBtn.tsx +++ b/src/view/com/util/AccountDropdownBtn.tsx @@ -1,59 +1,53 @@ import React from 'react' -import {msg, Trans} from '@lingui/macro' +import {Pressable} from 'react-native' +import { + FontAwesomeIcon, + FontAwesomeIconStyle, +} from '@fortawesome/react-native-fontawesome' +import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' import {SessionAccount, useSessionApi} from '#/state/session' -import {HITSLOP_10} from 'lib/constants' -import {Button, ButtonIcon} from '#/components/Button' +import {usePalette} from 'lib/hooks/usePalette' +import {s} from 'lib/styles' import {useDialogControl} from '#/components/Dialog' -import {DotGrid_Stroke2_Corner0_Rounded as Ellipsis} from '#/components/icons/DotGrid' -import {Trash_Stroke2_Corner0_Rounded as Trash} from '#/components/icons/Trash' -import * as Menu from '#/components/Menu' import * as Prompt from '#/components/Prompt' import * as Toast from '../../com/util/Toast' +import {DropdownItem, NativeDropdown} from './forms/NativeDropdown' export function AccountDropdownBtn({account}: {account: SessionAccount}) { - const {_} = useLingui() + const pal = usePalette('default') const {removeAccount} = useSessionApi() const removePromptControl = useDialogControl() + const {_} = useLingui() + const items: DropdownItem[] = [ + { + label: _(msg`Remove account`), + onPress: removePromptControl.open, + icon: { + ios: { + name: 'trash', + }, + android: 'ic_delete', + web: ['far', 'trash-can'], + }, + }, + ] return ( <> -