ghost-keychain/packages/extension-ui/src/components/Menu.tsx
Thibaut Sardan 8d351e06c4
Ledger nano support (#624)
* networks

* bump

* wip

* settings checkbox

* add @polkadot/networks and hw-ledger

* bump

* wip

* better error

* cleanup

* icon, cannot change genesis, tests for address and account

* clean workflow with refresh

* bump keyring

* I said bump keyring

* Add siging - unexpected call index

* can sign

* refactor

* refactor useLedger

* better error

* first time flow in a new window

* stray comments

* cleanup

* useless rerendering because of t :|

* Apply suggestions from code review

Co-authored-by: Jaco Greeff <jacogr@gmail.com>

* number casting after select

* Apply suggestions from code review

Co-authored-by: Jaco Greeff <jacogr@gmail.com>

* address comment

* parenthesis

Co-authored-by: Jaco Greeff <jacogr@gmail.com>
2021-01-21 15:22:28 +01:00

38 lines
863 B
TypeScript

// Copyright 2019-2021 @polkadot/extension-ui authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { ThemeProps } from '../types';
import React from 'react';
import styled from 'styled-components';
interface Props {
children: React.ReactNode;
className?: string;
reference: React.RefObject<HTMLDivElement>;
}
function Menu ({ children, className, reference }: Props): React.ReactElement<Props> {
return (
<div
className={className}
ref={reference}
>
{children}
</div>
);
}
export default styled(Menu)(({ theme }: ThemeProps) => `
background: ${theme.popupBackground};
border-radius: 4px;
border: 1px solid ${theme.boxBorderColor};
box-sizing: border-box;
box-shadow: 0 0 10px ${theme.boxShadow};
margin-top: 60px;
padding: 16px 0;
position: absolute;
right: 0;
z-index: 2;
`);