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
George Marshall 739075662c
Migrating Icon to typescript and deprecating JS component (#18431)
* Migrating Icon to typescript and deprecating JS component

* gw suggestions (#18434)

---------

Co-authored-by: Garrett Bear <gwhisten@gmail.com>
2023-04-04 09:48:04 -07:00

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