* derive accounts for master account * Add master field to account context (#75) * add master field to account context * add tests for buildHierarchy function * Fix selection master account * Add path numeration for derived accounts (#76) * add path numeration for derived accounts * Fix PR notices. Add util for Path generation. * Correct test Co-authored-by: Ivan Rukhavets <ivanruch@gmail.com> Co-authored-by: VladStarostenko <vlad@DESKTOP-V12SRE8.localdomain> * Add arrows to buttons (#77) * Add parent label (#80) * refactor parent label * refactor parent label * refactor parent label Co-authored-by: Ivan Rukhavets <ivanruch@gmail.com> * Implement new create account flow (#78) * Add copied snackbar (#83) * refactor parent label * Add "Copied" snackbar * Add "Copied" snackbar * Hide suri input behind a spoiler (#84) * Disallow changing parent account when 'Derive' option is clicked (#82) * Add lock to path input (#85) Co-authored-by: VladStarostenko <38181661+VladStarostenko@users.noreply.github.com> Co-authored-by: VladStarostenko <vlad@DESKTOP-V12SRE8.localdomain>
39 lines
943 B
TypeScript
39 lines
943 B
TypeScript
// Copyright 2019-2020 @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 React from 'react';
|
|
import styled from 'styled-components';
|
|
|
|
import arrowLeft from '../assets/arrowLeft.svg';
|
|
import Button from './Button';
|
|
import Svg from './Svg';
|
|
|
|
interface Props {
|
|
onClick: () => void;
|
|
}
|
|
|
|
export default function BackButton ({ onClick }: Props): React.ReactElement<Props> {
|
|
return (
|
|
<SmallButton onClick={onClick}>
|
|
<ArrowLeft />
|
|
</SmallButton>
|
|
);
|
|
}
|
|
|
|
const SmallButton = styled(Button)`
|
|
margin-right: 11px;
|
|
width: 42px;
|
|
background: ${({ theme }): string => theme.backButtonBackground};
|
|
`;
|
|
|
|
const ArrowLeft = styled(Svg).attrs(() => ({
|
|
src: arrowLeft
|
|
}))`
|
|
width: 12px;
|
|
height: 12px;
|
|
display: block;
|
|
margin: auto;
|
|
background: ${({ theme }): string => theme.backButtonTextColor};
|
|
`;
|