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
59 changes: 47 additions & 12 deletions packages/extension-ui/src/Popup/Accounts/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// of the Apache-2.0 license. See the LICENSE file for details.

import React, { useContext } from 'react';
import QrImage from '../../assets/qr.svg';

import {
AccountContext,
Expand All @@ -15,6 +16,41 @@ import {
VerticalSpace
} from '../../components';
import Account from './Account';
import styled from 'styled-components';

const ButtonWithSubtitle = styled(Button)`
margin-right: 8px;

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;

span {
width: 20px;
height: 20px;
display: block;
mask: url(${QrImage});
mask-size: cover;
background: ${({ theme }): string => theme.color};
}
`;

type Props = {};

Expand Down Expand Up @@ -47,19 +83,18 @@ export default function Accounts (): React.ReactElement<Props> {
}
<VerticalSpace/>
<ButtonArea>
<Button
label='I want to create a new account with a new seed'
to='/account/create'
/>
<Button
label='I have a pre-existing seed, import the account'
to='/account/import-seed'
/>
<ButtonWithSubtitle to='/account/create'>
<h4>Create New Account</h4>
<p>With new seed</p>
</ButtonWithSubtitle>
<ButtonWithSubtitle to='/account/import-seed'>
<h4>Import an Account</h4>
<p>I have a pre-existing seed</p>
</ButtonWithSubtitle>
{mediaAllowed && (
<Button
label='I have an external account, add it via QR'
to='/account/import-qr'
/>
<QrButton to='/account/import-qr'>
<span/>
</QrButton>
)}
</ButtonArea>
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,15 @@ const Title = styled.span`
const CurrentStep = styled.span`
font-size: ${({ theme }): string => theme.labelFontSize};
line-height: ${({ theme }): string => theme.labelLineHeight};
color: ${({ theme }): string => theme.primaryColor}
color: ${({ theme }): string => theme.primaryColor};
font-weight: 600;
`;

const TotalSteps = styled.span`
font-size: ${({ theme }): string => theme.labelFontSize};
line-height: ${({ theme }): string => theme.labelLineHeight};
color: ${({ theme }): string => theme.color}
color: ${({ theme }): string => theme.color};
font-weight: 600;
`;

function CreationStep ({ step, onClick, className }: Props): React.ReactElement<Props> {
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
3 changes: 3 additions & 0 deletions packages/extension-ui/src/assets/qr.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 1 addition & 6 deletions packages/extension-ui/src/components/ButtonArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,15 @@
// of the Apache-2.0 license. See the LICENSE file for details.

import styled from 'styled-components';
import Button from './Button';

export default styled.div`
display: flex;
flex-direction: column;
flex-direction: row;
background: ${({ theme }): string => theme.btnAreaBackground};
padding: 12px 1rem;

&&& {
margin-left: 0;
margin-right: 0;
}

${Button}:not(:last-child) {
margin-bottom: 1.5rem;
}
`;
18 changes: 9 additions & 9 deletions packages/extension-ui/src/components/Fonts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,28 @@ import NunitoregularWoff2 from '../assets/fonts/Nunitoregular.woff2';
import NunitoregularWoff from '../assets/fonts/Nunitoregular.woff';
import NunitosemiboldWoff2 from '../assets/fonts/Nunitosemibold.woff2';
import NunitosemiboldWoff from '../assets/fonts/Nunitosemibold.woff';
import NunitoboldWoff2 from '../assets/fonts/Nunitobold.woff2';
import NunitoboldWoff from '../assets/fonts/Nunitobold.woff';
import NunitolightWoff2 from '../assets/fonts/Nunitolight.woff2';
import NunitolightWoff from '../assets/fonts/Nunitolight.woff';

export default createGlobalStyle`
@font-face {
font-family: 'Nunito';
src: url(${NunitoregularWoff2}) format('woff2'),
url(${NunitoregularWoff}) format('woff');
font-weight: normal;
src: url(${NunitolightWoff2}) format('woff2'),
url(${NunitolightWoff}) format('woff');
font-weight: 400;
font-style: normal;
}
@font-face {
font-family: 'Nunito';
src: url(${NunitosemiboldWoff2}) format('woff2'),
url(${NunitosemiboldWoff}) format('woff');
src: url(${NunitoregularWoff2}) format('woff2'),
url(${NunitoregularWoff}) format('woff');
font-weight: 600;
font-style: normal;
}
@font-face {
font-family: 'Nunito';
src: url(${NunitoboldWoff2}) format('woff2'),
url(${NunitoboldWoff}) format('woff');
src: url(${NunitosemiboldWoff2}) format('woff2'),
url(${NunitosemiboldWoff}) format('woff');
font-weight: 800;
font-style: normal;
}
Expand Down