Skip to content

Commit

Permalink
unify
Browse files Browse the repository at this point in the history
  • Loading branch information
jonator committed Nov 4, 2024
1 parent 0703f47 commit de87430
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions packages/web/components/table/portfolio-asset-balances.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ const AssetActionsCell: AssetCellComponent<{
</Button>
)}
{!needsActivation && (
<div className="flex gap-3 md:hidden">
<>
{showConvertButton ? (
<Button
variant="secondary"
Expand All @@ -602,7 +602,7 @@ const AssetActionsCell: AssetCellComponent<{
<Button
size="icon"
variant="secondary"
className="bg-osmoverse-alpha-850 hover:bg-osmoverse-alpha-800"
className="bg-osmoverse-alpha-850 hover:bg-osmoverse-alpha-800 shrink-0"
onClick={(e) => {
e.stopPropagation();
e.preventDefault();
Expand All @@ -617,7 +617,7 @@ const AssetActionsCell: AssetCellComponent<{
<Button
size="icon"
variant="secondary"
className="bg-osmoverse-alpha-850 hover:bg-osmoverse-alpha-800"
className="bg-osmoverse-alpha-850 hover:bg-osmoverse-alpha-800 shrink-0"
onClick={(e) => {
e.stopPropagation();
e.preventDefault();
Expand All @@ -631,29 +631,36 @@ const AssetActionsCell: AssetCellComponent<{
</Button>
</>
)}
<AssetActionsDropdown
actionOptions={actionOptions}
onSelectAction={onSelectAction}
/>
</div>
</>
)}
<AssetActionsDropdown
disabled={needsActivation}
actionOptions={actionOptions}
onSelectAction={onSelectAction}
/>
</div>
);
};

const AssetActionsDropdown: FunctionComponent<{
disabled?: boolean;
actionOptions: {
key: Action;
label: string;
icon: SpriteIconId;
}[];
onSelectAction: (key: Action) => void;
}> = ({ actionOptions, onSelectAction }) => {
}> = ({ actionOptions, onSelectAction, disabled }) => {
return (
<Popover className="relative shrink-0">
{() => (
<>
<PopoverButton as={Button} size="icon" variant="ghost">
<PopoverButton
as={Button}
size="icon"
variant="ghost"
disabled={disabled}
>
<Icon id="dots-three-vertical" width={24} height={24} />
</PopoverButton>

Expand Down

0 comments on commit de87430

Please sign in to comment.