Skip to content

Commit

Permalink
fix: disable custom button for now
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarkhanzadian committed Dec 27, 2024
1 parent 9e076d2 commit 320ca9c
Showing 1 changed file with 33 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ReactNode } from 'react';

import { Avatar, ItemLayout, Pressable } from '@leather.io/ui/native';
import { Avatar, Box, ItemLayout, Pressable } from '@leather.io/ui/native';

interface BaseFeeOptionProps {
onPress(): void;
Expand All @@ -24,24 +24,37 @@ export function BaseFeeOption({
balanceUsd,
}: BaseFeeOptionProps) {
return (
<Pressable
borderColor={isSelected ? 'ink.text-primary' : 'ink.border-default'}
borderWidth={1}
borderRadius="xs"
flexDirection="row"
alignItems="center"
p="3"
gap="3"
onPress={onPress}
disabled={disabled}
>
<Avatar>{icon}</Avatar>
<ItemLayout
titleLeft={title}
captionLeft={time}
titleRight={balance}
captionRight={balanceUsd}
/>
</Pressable>
<>
<Pressable
borderColor={isSelected ? 'ink.text-primary' : 'ink.border-default'}
borderWidth={1}
borderRadius="xs"
flexDirection="row"
alignItems="center"
p="3"
gap="3"
onPress={onPress}
disabled={disabled}
>
<Avatar>{icon}</Avatar>
<ItemLayout
titleLeft={title}
captionLeft={time}
titleRight={balance}
captionRight={balanceUsd}
/>
{disabled && (
<Box
top={0}
bottom={0}
right={0}
left={0}
position="absolute"
backgroundColor="ink.background-overlay"
opacity={0.1}
/>
)}
</Pressable>
</>
);
}

0 comments on commit 320ca9c

Please sign in to comment.