mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
739075662c
* Migrating Icon to typescript and deprecating JS component * gw suggestions (#18434) --------- Co-authored-by: Garrett Bear <gwhisten@gmail.com>
32 lines
790 B
JavaScript
32 lines
790 B
JavaScript
import React from 'react';
|
|
import PropTypes from 'prop-types';
|
|
import {
|
|
Icon,
|
|
ICON_NAMES,
|
|
ICON_SIZES,
|
|
} from '../../../components/component-library/icon/deprecated';
|
|
|
|
const AssetBreadcrumb = ({ accountName, assetName, onBack }) => {
|
|
return (
|
|
<button className="asset-breadcrumb" onClick={onBack}>
|
|
<Icon
|
|
name={ICON_NAMES.ARROW_LEFT}
|
|
data-testid="asset__back"
|
|
marginInlineEnd={3}
|
|
size={ICON_SIZES.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;
|