forked from polkadot-js/apps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathParentAccount.tsx
45 lines (39 loc) · 992 Bytes
/
ParentAccount.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Copyright 2017-2022 @polkadot/page-accounts authors & contributors
// SPDX-License-Identifier: Apache-2.0
import React from 'react';
import styled from 'styled-components';
import AccountName from '@polkadot/react-components/AccountName';
import { Icon } from '@polkadot/react-components/index';
interface ParentAccountProps {
address: string,
className?: string
}
function ParentAccount ({ address, className }: ParentAccountProps): React.ReactElement<ParentAccountProps> {
return (
<div
className={className}
data-testid='parent'
>
<Icon
className='parent-icon'
icon='code-branch'
/>
<AccountName
value={address}
withSidebar
>
</AccountName>
</div>
);
}
export default React.memo(styled(ParentAccount)`
align-items: center;
color: #8B8B8B;
font-size: 0.75rem;
display: flex;
& .parent-icon {
font-size: 0.625rem;
margin-right: 0.3rem;
margin-left: 0.15rem;
}
`);