fix: fixed portfolio cards

This commit is contained in:
Linkie Link 2024-02-14 13:39:24 +01:00
parent b273cc23b3
commit 66a4c2aa9a
No known key found for this signature in database
GPG Key ID: 5318B0F2564D38EA
3 changed files with 13 additions and 7 deletions

View File

@ -63,7 +63,7 @@ export default function HealthBar({
health={isUpdated ? updatedHealth : health} health={isUpdated ? updatedHealth : health}
healthFactor={isUpdated ? updatedHealthFactor : healthFactor} healthFactor={isUpdated ? updatedHealthFactor : healthFactor}
> >
<> <div className={classNames('flex w-full', showIcon && 'gap-2')}>
{showIcon && ( {showIcon && (
<HealthIcon <HealthIcon
health={health} health={health}
@ -72,7 +72,13 @@ export default function HealthBar({
colorClass='text-white' colorClass='text-white'
/> />
)} )}
<div className={classNames('flex w-full', 'rounded-full overflow-hidden', className)}> <div
className={classNames(
'flex w-full flex-shrink',
'rounded-full overflow-hidden',
className,
)}
>
<svg <svg
version='1.1' version='1.1'
xmlns='http://www.w3.org/2000/svg' xmlns='http://www.w3.org/2000/svg'
@ -153,7 +159,7 @@ export default function HealthBar({
)} )}
</svg> </svg>
</div> </div>
</> </div>
</HealthTooltip> </HealthTooltip>
) )
} }

View File

@ -48,7 +48,7 @@ export const Tooltip = (props: Props) => {
visible={props.visible} visible={props.visible}
> >
{props.children ? ( {props.children ? (
<span <div
className={classNames( className={classNames(
props.underline && props.underline &&
'border-b hover:cursor-help border-dashed border-white/20 pb-1 hover:border-transparent', 'border-b hover:cursor-help border-dashed border-white/20 pb-1 hover:border-transparent',
@ -57,7 +57,7 @@ export const Tooltip = (props: Props) => {
)} )}
> >
{props.children} {props.children}
</span> </div>
) : ( ) : (
<span <span
className={classNames( className={classNames(

View File

@ -2,9 +2,9 @@ import React from 'react'
import HealthBar from 'components/account/Health/HealthBar' import HealthBar from 'components/account/Health/HealthBar'
import Card from 'components/common/Card' import Card from 'components/common/Card'
import HLSTag from 'components/hls/HLSTag'
import Text from 'components/common/Text' import Text from 'components/common/Text'
import TitleAndSubCell from 'components/common/TitleAndSubCell' import TitleAndSubCell from 'components/common/TitleAndSubCell'
import HLSTag from 'components/hls/HLSTag'
interface Props { interface Props {
stats: { title: React.ReactNode; sub: string }[] stats: { title: React.ReactNode; sub: string }[]
@ -33,7 +33,7 @@ export default function Skeleton(props: Props) {
<TitleAndSubCell key={`${accountId}-${sub}`} title={title} sub={sub} /> <TitleAndSubCell key={`${accountId}-${sub}`} title={title} sub={sub} />
))} ))}
</div> </div>
<div className='flex gap-1 mt-6'> <div className='flex mt-6'>
<HealthBar health={health} healthFactor={healthFactor} showIcon /> <HealthBar health={health} healthFactor={healthFactor} showIcon />
</div> </div>
</Card> </Card>