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}
healthFactor={isUpdated ? updatedHealthFactor : healthFactor}
>
<>
<div className={classNames('flex w-full', showIcon && 'gap-2')}>
{showIcon && (
<HealthIcon
health={health}
@ -72,7 +72,13 @@ export default function HealthBar({
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
version='1.1'
xmlns='http://www.w3.org/2000/svg'
@ -153,7 +159,7 @@ export default function HealthBar({
)}
</svg>
</div>
</>
</div>
</HealthTooltip>
)
}

View File

@ -48,7 +48,7 @@ export const Tooltip = (props: Props) => {
visible={props.visible}
>
{props.children ? (
<span
<div
className={classNames(
props.underline &&
'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}
</span>
</div>
) : (
<span
className={classNames(

View File

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