1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/ui/pages/asset/components/asset-breadcrumb.js
Garrett Bear 3e520214c9
update icons to ts enum version (#18698)
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>
2023-04-24 09:19:19 -05:00

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>
&nbsp;/&nbsp;
<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;