mango-v4-ui/components/trade/PerpSideBadge.tsx

23 lines
558 B
TypeScript
Raw Normal View History

2023-01-16 19:50:20 -08:00
const PerpSideBadge = ({ basePosition }: { basePosition: number }) => {
return (
<>
{basePosition !== 0 ? (
<span
2023-03-02 18:40:49 -08:00
className={`inline-block rounded uppercase ${
basePosition > 0
? 'text-th-up md:border md:border-th-up'
: 'text-th-down md:border md:border-th-down'
}
uppercase md:-my-0.5 md:px-1.5 md:py-0.5 md:text-xs`}
>
{basePosition > 0 ? 'Long' : 'Short'}
</span>
2023-01-16 19:50:20 -08:00
) : (
'--'
)}
</>
)
}
2022-11-01 06:10:08 -07:00
export default PerpSideBadge