mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
3e520214c9
Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net> Co-authored-by: George Marshall <george.marshall@consensys.net> Co-authored-by: Brad Decker <bhdecker84@gmail.com> Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
32 lines
765 B
JavaScript
32 lines
765 B
JavaScript
import React from 'react';
|
|
import PropTypes from 'prop-types';
|
|
import {
|
|
Icon,
|
|
IconName,
|
|
IconSize,
|
|
} from '../../../components/component-library';
|
|
|
|
const AssetBreadcrumb = ({ accountName, assetName, onBack }) => {
|
|
return (
|
|
<button className="asset-breadcrumb" onClick={onBack}>
|
|
<Icon
|
|
name={IconName.ArrowLeft}
|
|
data-testid="asset__back"
|
|
marginInlineEnd={3}
|
|
size={IconSize.Xs}
|
|
/>
|
|
<span>{accountName}</span>
|
|
/
|
|
<span className="asset-breadcrumb__asset">{assetName}</span>
|
|
</button>
|
|
);
|
|
};
|
|
|
|
AssetBreadcrumb.propTypes = {
|
|
accountName: PropTypes.string.isRequired,
|
|
assetName: PropTypes.string.isRequired,
|
|
onBack: PropTypes.func.isRequired,
|
|
};
|
|
|
|
export default AssetBreadcrumb;
|