2020-06-01 19:54:32 +02:00
|
|
|
import React from 'react'
|
|
|
|
import PropTypes from 'prop-types'
|
|
|
|
|
|
|
|
const AssetBreadcrumb = ({ accountName, assetName, onBack }) => {
|
|
|
|
return (
|
2020-11-03 00:41:28 +01:00
|
|
|
<button className="asset-breadcrumb" onClick={onBack}>
|
|
|
|
<i
|
|
|
|
className="fas fa-chevron-left asset-breadcrumb__chevron"
|
|
|
|
data-testid="asset__back"
|
|
|
|
/>
|
|
|
|
<span>{accountName}</span>
|
2020-06-01 19:54:32 +02:00
|
|
|
/
|
2020-11-03 00:41:28 +01:00
|
|
|
<span className="asset-breadcrumb__asset">{assetName}</span>
|
2020-06-04 17:51:44 +02:00
|
|
|
</button>
|
2020-06-01 19:54:32 +02:00
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
AssetBreadcrumb.propTypes = {
|
|
|
|
accountName: PropTypes.string.isRequired,
|
|
|
|
assetName: PropTypes.string.isRequired,
|
|
|
|
onBack: PropTypes.func.isRequired,
|
|
|
|
}
|
|
|
|
|
|
|
|
export default AssetBreadcrumb
|