Skip to content

Commit

Permalink
feat: add logos, match card ui to design
Browse files Browse the repository at this point in the history
  • Loading branch information
rozanagy committed Nov 5, 2024
1 parent 19c65be commit 8dc4238
Show file tree
Hide file tree
Showing 9 changed files with 143 additions and 20 deletions.
Binary file added public/images/deposit-img.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/images/logos/enzyme-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions public/images/logos/mellow-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions public/images/logos/symbiotic-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ import {
} from './one-click-yield-container.select-vault-type-stack.vault-type-box/one-click-yield-container.select-vault-type-stack.vault-type-box';

const mockVaultTypes: OneClickYieldVaultInformation[] = [
{ vaultType: 'enzyme-curve', vaultTypeLabel: 'Enzyme Curve Vault' },
{
vaultType: 'enzyme-curve',
vaultTypeLabel: 'Enzyme Curve Vault',
vaultTypeLogoUrl: '/images/logos/enzyme-logo.svg',
},
];

interface SelectVaultTypeStackProps {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { HStack, Image, Text } from '@chakra-ui/react';

export interface VaultTypeBoxPointChipProps {
bgColor: string;
imgPath: string;
multiplier: number;
}

export function VaultTypeBoxPointChip({
bgColor,
imgPath,
multiplier,
}: VaultTypeBoxPointChipProps): React.JSX.Element {
return (
<HStack
py={'5px'}
px={'10px'}
borderRadius={'20px'}
justifyContent={'space-between'}
bg={bgColor}
>
<Image src={imgPath} alt={'Point logo'} />
<Text fontSize={'lg'} color={'white.01'} fontWeight={'800'}>{`${multiplier}x`}</Text>
</HStack>
);
}
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
import { HStack } from '@chakra-ui/react';
import { VStack } from '@chakra-ui/react';
import { HasChildren } from '@models/has-children';

export function VaultTypeBoxLayout({ children }: HasChildren): React.JSX.Element {
return (
<HStack
<VStack
p={'15px'}
w={'100%'}
spacing={'15px'}
spacing={'25px'}
border={'1px'}
borderColor={'orange.01'}
borderRadius={'md'}
justifyContent={'space-between'}
bg={'background.content.01'}
>
{children}
</HStack>
</VStack>
);
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import { Button, Text } from '@chakra-ui/react';
import { InfoOutlineIcon } from '@chakra-ui/icons';
import { Button, HStack, Image, Text, VStack } from '@chakra-ui/react';

import { VaultTypeBoxPointChip } from './components/one-click-yield-container.select-vault-type-stack.vault-type-box.point-chip';
import { VaultTypeBoxLayout } from './one-click-yield-container.select-vault-type-stack.vault-type-box.layout';

export interface OneClickYieldVaultInformation {
vaultType: string;
vaultTypeLabel: string;
vaultTypeLogoUrl: string;
}

interface VaultTypeBoxProps {
Expand All @@ -16,22 +19,59 @@ export function VaultTypeBox({
vaultInformation,
handleSelectVaultTypeClick,
}: VaultTypeBoxProps): React.JSX.Element {
const { vaultType, vaultTypeLabel } = vaultInformation;
const { vaultType, vaultTypeLabel, vaultTypeLogoUrl } = vaultInformation;

Check warning on line 22 in src/app/components/one-click-yield-container/components/one-click-yield-container.select-vault-type-stack/one-click-yield-container.select-vault-type-stack.vault-type-box/one-click-yield-container.select-vault-type-stack.vault-type-box.tsx

View workflow job for this annotation

GitHub Actions / lint-eslint

'vaultTypeLabel' is assigned a value but never used

Check failure on line 22 in src/app/components/one-click-yield-container/components/one-click-yield-container.select-vault-type-stack/one-click-yield-container.select-vault-type-stack.vault-type-box/one-click-yield-container.select-vault-type-stack.vault-type-box.tsx

View workflow job for this annotation

GitHub Actions / typecheck

'vaultTypeLabel' is declared but its value is never read.
return (
<VaultTypeBoxLayout>
<Text color={'white.01'}>{vaultTypeLabel}</Text>
<Button
w={'50%'}
p={'2.5px'}
bg={'white.04'}
color={'white.01'}
fontSize={'sm'}
fontWeight={'bold'}
_hover={{ bg: 'orange.01', color: 'white.01' }}
onClick={() => handleSelectVaultTypeClick(vaultType)}
>
Deposit Bitcoin
</Button>
<HStack w={'100%'} justifyContent={'space-between'}>
<HStack>
<Image src={vaultTypeLogoUrl} alt={'Enzyme logo'} />
<InfoOutlineIcon color={'purple.01'} />
</HStack>
<Button
variant={'depositBTC'}
// _hover={{ bg: 'orange.01', color: 'white.01' }}
onClick={() => handleSelectVaultTypeClick(vaultType)}
>
<HStack>
<Image src={'/images/deposit-img.png'} alt={'Deposit image'} />
<Text fontSize={'lg'} fontWeight={'800'} color={'white.01'}>
Deposit BTC
</Text>
</HStack>
</Button>
</HStack>
<HStack alignItems={'flex-start'} w={'100%'}>
<VStack alignItems={'flex-start'} w={'30%'}>
<Text fontSize={'md'} fontWeight={'800'} color={'white.02'}>
Current APY
</Text>
<Text fontSize={'lg'} fontWeight={'800'} color={'white.01'}>
+12.5%
</Text>
</VStack>
<VStack alignItems={'flex-start'} w={'70%'}>
<Text fontSize={'md'} fontWeight={'800'} color={'white.02'}>
Points
</Text>
<HStack>
<VaultTypeBoxPointChip
bgColor={'purple.01'}
imgPath={'/images/deposit-img.png'}
multiplier={5}
/>
<VaultTypeBoxPointChip
bgColor={'white.03'}
imgPath={'/images/logos/symbiotic-logo.svg'}
multiplier={20}
/>
<VaultTypeBoxPointChip
bgColor={'white.03'}
imgPath={'/images/logos/mellow-logo.svg'}
multiplier={47}
/>
</HStack>
</VStack>
</HStack>
</VaultTypeBoxLayout>
);
}
11 changes: 11 additions & 0 deletions src/styles/button-theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,16 @@ const merchantTableItem = defineStyle({
},
});

const depositBTC = defineStyle({
py: '15px',
px: '3px',
h: '40px',
w: '145px',
bg: 'orange.01',
});



export const buttonTheme = defineStyleConfig({
baseStyle: basestyle,
variants: {
Expand All @@ -172,5 +182,6 @@ export const buttonTheme = defineStyleConfig({
ledger,
points,
merchantTableItem,
depositBTC,
},
});

0 comments on commit 8dc4238

Please sign in to comment.