Skip to content

Commit

Permalink
fix: scrollbar for basket (#1968)
Browse files Browse the repository at this point in the history
  • Loading branch information
Asmadek authored and stepanLav committed Jul 17, 2024
1 parent 829cb6f commit 4500b4b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions src/renderer/app/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,7 @@ ul:focus-visible {
left: 0;
top: 0;
}

.scrollbar-stable {
scrollbar-gutter: stable both-edges;
}
2 changes: 1 addition & 1 deletion src/renderer/pages/Basket/ui/Basket.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export const Basket = () => {
</div>
</div>

<div className="w-full mt-4 gap-4 flex flex-col items-center overflow-y-auto">
<div className="w-full mt-4 gap-4 flex flex-col items-center overflow-y-auto scrollbar-stable">
<ul className="rounded-md flex divide-y flex-col gap-y-1.5 w-[736px]">
{filteredTxs.map((tx) => (
<li key={tx.id} className="flex gap-x-4 px-3 bg-block-background-default">
Expand Down
7 changes: 4 additions & 3 deletions src/renderer/pages/Basket/ui/Operation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const Operation = ({ tx, errorText, validating, onClick, onTxRemoved }: P
if (errorText) {
return (
<Tooltip offsetPx={-65} content={<Trans t={t} i18nKey={errorText} />}>
<div className="flex gap-x-1 items-center rounded-md bg-badge-red-background-default px-2 py-0.5">
<div className="w-[106px] flex gap-x-1 items-center justify-center rounded-md bg-badge-red-background-default px-2 py-0.5">
<HelpText className="text-text-negative">{t('basket.validationError')} </HelpText>
</div>
</Tooltip>
Expand All @@ -60,11 +60,12 @@ export const Operation = ({ tx, errorText, validating, onClick, onTxRemoved }: P
if (tx.error) {
return (
<Tooltip offsetPx={-65} content={<Trans t={t} i18nKey={tx.error.message} />}>
<div className="flex gap-x-1 items-center rounded-md bg-badge-orange-background-default px-2 py-0.5">
<div className="w-[106px] flex gap-x-1 items-center justify-center rounded-md bg-badge-orange-background-default px-2 py-0.5">
<HelpText className="text-text-warning">
{t('basket.chainError', {
date: (tx.error as ChainError).dateCreated
? new Date((tx.error as ChainError).dateCreated).toLocaleDateString()
? // TODO: Use formatDate from i18n
new Date((tx.error as ChainError).dateCreated).toLocaleDateString()
: '',
})}
</HelpText>
Expand Down

0 comments on commit 4500b4b

Please sign in to comment.