Skip to content

Commit

Permalink
fix(suite): Fix labelling blinking (#16706)
Browse files Browse the repository at this point in the history
  • Loading branch information
jvaclavik authored Jan 30, 2025
1 parent 26803f8 commit ad24b89
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 19 deletions.
34 changes: 16 additions & 18 deletions packages/suite/src/components/suite/AccountLabel.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import styled from 'styled-components';

import { BadgeSize, Row, TOOLTIP_DELAY_LONG, TruncateWithTooltip } from '@trezor/components';
import { BadgeSize, Row } from '@trezor/components';
import { spacings } from '@trezor/theme';
import type {
AccountType,
Expand Down Expand Up @@ -43,22 +43,20 @@ export const AccountLabel = ({
const { getDefaultAccountLabel } = useDefaultAccountLabel();

return (
<TruncateWithTooltip delayShow={TOOLTIP_DELAY_LONG}>
<Row gap={spacings.sm}>
{accountLabel ? (
<TabularNums>{accountLabel}</TabularNums>
) : (
getDefaultAccountLabel({ accountType, symbol, index })
)}
{showAccountTypeBadge && (
<AccountTypeBadge
accountType={accountType}
size={accountTypeBadgeSize}
path={path}
networkType={networkType}
/>
)}
</Row>
</TruncateWithTooltip>
<Row gap={spacings.sm}>
{accountLabel ? (
<TabularNums>{accountLabel}</TabularNums>
) : (
getDefaultAccountLabel({ accountType, symbol, index })
)}
{showAccountTypeBadge && (
<AccountTypeBadge
accountType={accountType}
size={accountTypeBadgeSize}
path={path}
networkType={networkType}
/>
)}
</Row>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const withDropdown = (WrappedComponent: FC<ExtendedProps>) => (props: Pro
isDisabled={props.editActive}
placement={{
position: 'bottom',
alignment: 'end',
alignment: 'start',
}}
renderOnClickPosition
items={[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { AccountLabels } from 'src/types/suite/metadata';
const TruncatedSpan = styled.span<{ $isBlurred?: boolean }>`
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
`;

interface TargetAddressLabelProps {
Expand Down

0 comments on commit ad24b89

Please sign in to comment.