// 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 { AccountsFromCtx } from './types'; import React from 'react'; import styled from 'styled-components'; import Identicon from '@polkadot/ui-identicon'; import Box from './Box'; import { withAccounts } from './contexts'; import defaults from './defaults'; type Props = { accounts: AccountsFromCtx, address?: string | null, children?: React.ReactNode; className?: string, isHidden?: boolean, name?: React.ReactNode | null, theme?: 'polkadot' | 'substrate' }; function Address ({ accounts, address, children, className, isHidden, name, theme = 'polkadot' }: Props) { if (isHidden) { return null; } const account = accounts.find((account) => account.address === address); return (