mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
add edit button support to transaction-detail-item (#11481)
This commit is contained in:
parent
d438439661
commit
36ab817858
@ -3,6 +3,20 @@
|
||||
|
||||
&__row {
|
||||
display: flex;
|
||||
|
||||
&--action-row {
|
||||
justify-content: flex-end;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
&__action-button.button {
|
||||
@include H7;
|
||||
|
||||
width: auto;
|
||||
padding: 0;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
&__title {
|
||||
|
@ -7,6 +7,7 @@ import {
|
||||
FONT_WEIGHT,
|
||||
TYPOGRAPHY,
|
||||
} from '../../../helpers/constants/design-system';
|
||||
import Button from '../../ui/button';
|
||||
|
||||
export default function TransactionDetailItem({
|
||||
detailTitle,
|
||||
@ -14,9 +15,22 @@ export default function TransactionDetailItem({
|
||||
detailTotal,
|
||||
subTitle,
|
||||
subText,
|
||||
handleActionClick,
|
||||
actionText,
|
||||
}) {
|
||||
return (
|
||||
<div className="transaction-detail-item">
|
||||
{actionText && handleActionClick && (
|
||||
<div className="transaction-detail-item__row transaction-detail-item__row--action-row">
|
||||
<Button
|
||||
className="transaction-detail-item__action-button"
|
||||
onClick={handleActionClick}
|
||||
type="link"
|
||||
>
|
||||
{actionText}
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
<div className="transaction-detail-item__row">
|
||||
<Typography
|
||||
color={COLORS.BLACK}
|
||||
@ -63,6 +77,8 @@ export default function TransactionDetailItem({
|
||||
}
|
||||
|
||||
TransactionDetailItem.propTypes = {
|
||||
handleActionClick: PropTypes.func,
|
||||
actionText: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
||||
detailTitle: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
||||
detailText: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
||||
detailTotal: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
||||
|
Loading…
x
Reference in New Issue
Block a user