* Add typings to messages * Fix eslint (after merge) * Mobile signer support (via Qr) * Bump common * Pass through genesisHash * Ok, well, it does something... not recognized * Bump ui * Exclude build from lint * ** * Display accounts with prefix from genesisHash * Adapth for object via scan interface * Bump deps * Split address recoding * Cleanup decoding readability * Display chain affinity overlay * -1 prefix dropdown description * Add generator command * Fix TypeScript error * Lint * Consistent naming * Better promise error handling * Small consistency updates * Constraint handle typings as much as tsc will allow * State naming * Typo in cheain descriptions * Add signature handler (unused) * e2e roundtrip * remove (useless) dev 0.5.1 chain * Insert ActionBar * Revert to empty Props interfaces * SeedLengths type * Add type to transport subscription message * nit * Typecheck passing callback to sendMessage when none expected * Bump api * Small lint fixes * Bump api * Not sure it works... but linting passes * Split public/private * Alphabetical * Don't show button on no media * Remove unneeded resolve - NOT hacking around linting * Pass edited name through to accounts component * genesisHash alignments * Remove KeyringJson * SignRequest with account * Align with master naming * Some manual merges * Manual (small) conflict resolution * Fixup extension account mapping * Remove ununsed messages (less code = better) * Update comment around generation * Add copy-to-apps script (debugging)
63 lines
1.4 KiB
TypeScript
63 lines
1.4 KiB
TypeScript
// 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 React from 'react';
|
|
import styled from 'styled-components';
|
|
|
|
import Box from './Box';
|
|
import defaults from './defaults';
|
|
|
|
interface Props {
|
|
banner?: React.ReactNode;
|
|
children?: React.ReactNode;
|
|
className?: string;
|
|
icon: React.ReactNode;
|
|
intro: React.ReactNode;
|
|
name?: React.ReactNode | null;
|
|
theme?: 'polkadot' | 'substrate';
|
|
}
|
|
|
|
function IconBox ({ banner, children, className, icon, intro }: Props): React.ReactElement<Props> {
|
|
return (
|
|
<div className={className}>
|
|
<Box
|
|
banner={banner}
|
|
className='details'
|
|
>
|
|
<div className='intro'>{intro}</div>
|
|
<div className='children'>{children}</div>
|
|
</Box>
|
|
<div className='outer-icon'>{icon}</div>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default styled(IconBox)`
|
|
box-sizing: border-box;
|
|
margin: ${defaults.boxMargin};
|
|
padding: ${defaults.boxPadding};
|
|
padding-left: 1rem;
|
|
position: relative;
|
|
|
|
.details {
|
|
margin: 0;
|
|
|
|
.intro {
|
|
padding-left: 3rem;
|
|
}
|
|
}
|
|
|
|
.outer-icon {
|
|
height: 64px;
|
|
font-size: 36px;
|
|
left: 0.25rem;
|
|
line-height: 64px;
|
|
position: absolute;
|
|
top: -0.5rem;
|
|
vertical-align: middle;
|
|
width: 64px;
|
|
z-index: 1;
|
|
}
|
|
`;
|