mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 01:47:00 +01:00
UX Multichain: updated border top for activity list (#19176)
* updated border top for activity list * updated border css via prop * fixed symbol * fixed lint errors * fix conditions * updated snapshot
This commit is contained in:
parent
ae3021c697
commit
15598f2a23
@ -3,7 +3,7 @@
|
|||||||
exports[`Token Cell should match snapshot 1`] = `
|
exports[`Token Cell should match snapshot 1`] = `
|
||||||
<div>
|
<div>
|
||||||
<div
|
<div
|
||||||
class="list-item asset-list-item token-cell list-item--single-content-row"
|
class="list-item asset-list-item token-cell list-item--single-content-row list-item-border"
|
||||||
role="button"
|
role="button"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
>
|
>
|
||||||
|
@ -168,6 +168,7 @@ function TransactionListItemInner({
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
const showCancelButton = !hasCancelled && isPending && !isUnapproved;
|
const showCancelButton = !hasCancelled && isPending && !isUnapproved;
|
||||||
|
const showBorder = process.env.MULTICHAIN;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@ -178,6 +179,7 @@ function TransactionListItemInner({
|
|||||||
icon={
|
icon={
|
||||||
<TransactionIcon category={category} status={displayedStatusKey} />
|
<TransactionIcon category={category} status={displayedStatusKey} />
|
||||||
}
|
}
|
||||||
|
showBorder={showBorder}
|
||||||
subtitle={
|
subtitle={
|
||||||
<h3>
|
<h3>
|
||||||
<TransactionStatusLabel
|
<TransactionStatusLabel
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
exports[`ListItem should match snapshot with no props 1`] = `
|
exports[`ListItem should match snapshot with no props 1`] = `
|
||||||
<div>
|
<div>
|
||||||
<div
|
<div
|
||||||
class="list-item list-item--single-content-row"
|
class="list-item list-item--single-content-row list-item-border"
|
||||||
role="button"
|
role="button"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
>
|
>
|
||||||
@ -21,7 +21,7 @@ exports[`ListItem should match snapshot with no props 1`] = `
|
|||||||
exports[`ListItem should match snapshot with props 1`] = `
|
exports[`ListItem should match snapshot with props 1`] = `
|
||||||
<div>
|
<div>
|
||||||
<div
|
<div
|
||||||
class="list-item list-item-test"
|
class="list-item list-item-test list-item-border"
|
||||||
data-testid="test-id"
|
data-testid="test-id"
|
||||||
role="button"
|
role="button"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
@include Paragraph;
|
@include Paragraph;
|
||||||
|
|
||||||
border-top: 1px solid var(--color-border-muted);
|
|
||||||
border-bottom: 1px solid var(--color-border-muted);
|
border-bottom: 1px solid var(--color-border-muted);
|
||||||
color: var(--color-text-default);
|
color: var(--color-text-default);
|
||||||
display: grid;
|
display: grid;
|
||||||
@ -119,3 +118,7 @@
|
|||||||
grid-template-areas: 'icon head head head head mid mid mid mid right right right';
|
grid-template-areas: 'icon head head head head mid mid mid mid right right right';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.list-item-border {
|
||||||
|
border-top: 1px solid var(--color-border-muted);
|
||||||
|
}
|
||||||
|
@ -12,12 +12,16 @@ export default function ListItem({
|
|||||||
rightContent,
|
rightContent,
|
||||||
midContent,
|
midContent,
|
||||||
className,
|
className,
|
||||||
|
showBorder,
|
||||||
'data-testid': dataTestId,
|
'data-testid': dataTestId,
|
||||||
}) {
|
}) {
|
||||||
const primaryClassName = classnames(
|
const primaryClassName = classnames(
|
||||||
'list-item',
|
'list-item',
|
||||||
className,
|
className,
|
||||||
subtitle || children ? '' : 'list-item--single-content-row',
|
subtitle || children ? '' : 'list-item--single-content-row',
|
||||||
|
{
|
||||||
|
'list-item-border': !showBorder,
|
||||||
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -68,5 +72,6 @@ ListItem.propTypes = {
|
|||||||
midContent: PropTypes.node,
|
midContent: PropTypes.node,
|
||||||
className: PropTypes.string,
|
className: PropTypes.string,
|
||||||
onClick: PropTypes.func,
|
onClick: PropTypes.func,
|
||||||
|
showBorder: PropTypes.bool,
|
||||||
'data-testid': PropTypes.string,
|
'data-testid': PropTypes.string,
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user