Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 36 additions & 36 deletions packages/extension-ui/src/Popup/Accounts/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,54 +12,21 @@ import {
MediaContext,
AddAccount,
ButtonArea,
Svg
Svg,
Title
} from '../../components';
import Account from './Account';
import styled from 'styled-components';

const ButtonWithSubtitle = styled(Button)`

button {
padding-top: 0;
padding-bottom: 0;
}
h4 {
margin: 0;
font-weight: 600;
font-size: 15px;
line-height: 20px;
}
p {
margin: 0;
font-weight: 400;
font-size: 12px;
line-height: 16px;
}
`;

const QrButton = styled(Button)`
width: 60px;

${Svg} {
width: 20px;
height: 20px;
}
`;

const AccountsArea = styled.div`
height: 100%;
overflow: scroll;
`;

type Props = {};

export default function Accounts (): React.ReactElement<Props> {
const accounts = useContext(AccountContext);
const mediaAllowed = useContext(MediaContext);

return (
<>
<Header showSettings/>
<Title>Accounts</Title>
{
(accounts.length === 0)
? <AddAccount
Expand Down Expand Up @@ -98,3 +65,36 @@ export default function Accounts (): React.ReactElement<Props> {
</>
);
}

const ButtonWithSubtitle = styled(Button)`
button {
padding-top: 0;
padding-bottom: 0;
}
h4 {
margin: 0;
font-weight: 600;
font-size: 15px;
line-height: 20px;
}
p {
margin: 0;
font-weight: 400;
font-size: 12px;
line-height: 16px;
}
`;

const QrButton = styled(Button)`
width: 60px;

${Svg} {
width: 20px;
height: 20px;
}
`;

const AccountsArea = styled.div`
height: 100%;
overflow: scroll;
`;
3 changes: 2 additions & 1 deletion packages/extension-ui/src/Popup/Export.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import React, { useContext, useState } from 'react';
import { RouteComponentProps, withRouter } from 'react-router';

import { ActionContext, Address, Button, InputWithLabel, Warning } from '../components';
import { ActionContext, Address, Button, InputWithLabel, Title, Warning } from '../components';
import { exportAccount } from '../messaging';
import { Back } from '../partials';

Expand Down Expand Up @@ -37,6 +37,7 @@ function Export ({ match: { params: { address } } }: Props): React.ReactElement<
return (
<div>
<Back />
<Title>Export account</Title>
<Address address={address}>
<Warning danger>You are exporting your account. Keep it safe and don&apos;t share it with anyone.</Warning>
<InputWithLabel
Expand Down
3 changes: 2 additions & 1 deletion packages/extension-ui/src/Popup/Forget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import React, { useContext } from 'react';
import { RouteComponentProps, withRouter } from 'react-router';

import { ActionContext, Address, Button, Tip } from '../components';
import { ActionContext, Address, Button, Tip, Title } from '../components';
import { forgetAccount } from '../messaging';
import { Back } from '../partials';

Expand All @@ -22,6 +22,7 @@ function Forget ({ match: { params: { address } } }: Props): React.ReactElement<
return (
<div>
<Back />
<Title>Forget account</Title>
<Address address={address}>
<Tip warning type='error'>You are about to remove the account. This means that you will not be able to access it via this extension anymore. If you wish to recover it, you would need to use the seed.</Tip>
<Button
Expand Down
18 changes: 18 additions & 0 deletions packages/extension-ui/src/components/Title.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Copyright 2019 @polkadot/extension-ui authors & contributors
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.

import styled from 'styled-components';

export default styled.div`
width: 100%;
margin-bottom: 8px;
margin-top: 18px;
font-weight: 800;
font-size: 10px;
line-height: 14px;
letter-spacing: 0.04em;
text-transform: uppercase;
color: ${({ theme }): string => theme.textColor};
opacity: 0.65;
`;
1 change: 1 addition & 0 deletions packages/extension-ui/src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export { default as MnemonicSeed } from './MnemonicSeed';
export { default as Svg } from './Svg';
export { default as TextAreaWithLabel } from './TextAreaWithLabel';
export { default as Tip } from './Tip';
export { default as Title } from './Title';
export { default as VerticalSpace } from './VerticalSpace';
export { default as View } from './View';
export { default as Warning } from './Warning';
Expand Down