ghost-keychain/packages/extension-ui/src/Popup/Authorize/NoAccount.tsx
Jaco 0870570407
Adjust styles for styled-components 6.x (#1279)
* Adjust styles for styled-components 6.x

* Additional cleanups

* Cleanups

* Adjust

* styled with <Props>

* Adjust

* Additional

* Theme jiggling

* Non-vars overrides

* Adjust

* Adjust

* Adjust
2023-08-20 09:39:29 +03:00

48 lines
1.1 KiB
TypeScript

// Copyright 2019-2023 @polkadot/extension-ui authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { t } from 'i18next';
import React, { useCallback } from 'react';
import { Trans } from 'react-i18next';
import { Button, Warning } from '../../components/index.js';
import { deleteAuthRequest } from '../../messaging.js';
import { styled } from '../../styled.js';
interface Props {
authId: string;
className?: string;
}
function NoAccount ({ authId, className }: Props): React.ReactElement<Props> {
const _onClick = useCallback(() => {
deleteAuthRequest(authId).catch(console.error);
}, [authId]
);
return (
<div className={className}>
<Warning className='warningMargin'>
<Trans>You do not have any account. Please create an account and refresh the application&apos;s page.</Trans>
</Warning>
<Button
className='acceptButton'
onClick={_onClick}
>
{t('Understood')}
</Button>
</div>
);
}
export default styled(NoAccount)<Props>`
.acceptButton {
width: 90%;
margin: 25px auto 0;
}
.warningMargin {
margin: 1rem 24px 0 1.45rem;
}
`;