ghost-keychain/packages/extension-ui/src/components/RemoveAuth.tsx
Thibaut Sardan 00aa001c80
Account selection when authorizing a website (#1068)
* account selection design and functionnality

* fix build and tests

* lint

* fix FIXME

* dedicated screen when the user has no account

* add test for no account

* remove websote toggle and isAuthorized property

* place remove auth on the left

* account management

* fix build

* get rid of rejection message - similar to selecting 0 accounts

* show visibility action on account management

* fix build

* nit

* cleanup state on account forget

* add tests for hidden accounts in the auth view
2022-07-14 09:24:50 +03:00

36 lines
817 B
TypeScript

// Copyright 2019-2022 @polkadot/extension-ui authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { ThemeProps } from '../types';
import { faTrash } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import React from 'react';
import styled from 'styled-components';
interface Props{
className?: string
onRemove: () => void
}
function RemoveAuth ({ className, onRemove }: Props): React.ReactElement {
return (
<FontAwesomeIcon
className={className}
icon={faTrash}
onClick={onRemove}
size='lg'
/>
);
}
export default styled(RemoveAuth)(({ theme }: ThemeProps) => `
cursor: pointer;
color: ${theme.labelColor};
margin-right: 1rem;
&.selected {
color: ${theme.primaryColor};
}
`);