refactor(ui): refine positions table controls

This commit is contained in:
Saravana Achu Mac 2026-05-09 01:50:23 -07:00
parent bfd7d3bfec
commit fd64fecbce

View File

@ -1613,7 +1613,7 @@ export const PositionsTab = ({ botState, onManageHolding }: PositionsTabProps) =
]}
controlSize="sm"
variant="muted"
className="w-full bg-white/5 border border-white/10 rounded px-2 py-1 text-[10px] font-semibold text-gray-200 focus:outline-none focus:ring-2 focus:ring-orange-500/40"
className="w-full"
/>
</th>
<th className="px-4 py-2">
@ -1624,7 +1624,6 @@ export const PositionsTab = ({ botState, onManageHolding }: PositionsTabProps) =
onChange={(e: ChangeEvent<HTMLInputElement>) => setOrdersDateFrom(e.target.value)}
controlSize="sm"
variant="muted"
className="bg-white/5 border border-white/10 rounded px-2 py-1 text-[10px] text-gray-200 focus:outline-none focus:ring-2 focus:ring-orange-500/40"
/>
<Input
type="date"
@ -1632,7 +1631,6 @@ export const PositionsTab = ({ botState, onManageHolding }: PositionsTabProps) =
onChange={(e: ChangeEvent<HTMLInputElement>) => setOrdersDateTo(e.target.value)}
controlSize="sm"
variant="muted"
className="bg-white/5 border border-white/10 rounded px-2 py-1 text-[10px] text-gray-200 focus:outline-none focus:ring-2 focus:ring-orange-500/40"
/>
<div className="flex items-center gap-2">
<Button
@ -1643,7 +1641,7 @@ export const PositionsTab = ({ botState, onManageHolding }: PositionsTabProps) =
}}
variant="outline"
size="sm"
className="h-auto px-2 py-1 rounded border border-white/10 text-[9px] font-bold uppercase tracking-wider text-gray-300 hover:bg-white/5 transition-colors"
className="min-h-7 px-2 text-[9px]"
>
Clear
</Button>
@ -1652,7 +1650,7 @@ export const PositionsTab = ({ botState, onManageHolding }: PositionsTabProps) =
onClick={() => setOrdersSortDirection((current) => current === 'desc' ? 'asc' : 'desc')}
variant="outline"
size="sm"
className="h-auto px-2 py-1 rounded border border-white/10 text-[9px] font-bold uppercase tracking-wider text-gray-300 hover:bg-white/5 transition-colors"
className="min-h-7 px-2 text-[9px]"
>
{ordersSortDirection === 'desc' ? 'Newest' : 'Oldest'}
</Button>
@ -1807,7 +1805,6 @@ export const PositionsTab = ({ botState, onManageHolding }: PositionsTabProps) =
disabled={ordersPage === 1}
variant="outline"
size="sm"
className="h-auto px-3 py-1.5 rounded border border-white/10 disabled:opacity-40 disabled:cursor-not-allowed hover:bg-white/5 transition-colors"
>
Prev
</Button>
@ -1820,7 +1817,6 @@ export const PositionsTab = ({ botState, onManageHolding }: PositionsTabProps) =
disabled={ordersPage >= ordersTotalPages}
variant="outline"
size="sm"
className="h-auto px-3 py-1.5 rounded border border-white/10 disabled:opacity-40 disabled:cursor-not-allowed hover:bg-white/5 transition-colors"
>
Next
</Button>
@ -1880,7 +1876,7 @@ export const PositionsTab = ({ botState, onManageHolding }: PositionsTabProps) =
]}
controlSize="sm"
variant="muted"
className="w-full bg-white/5 border border-white/10 rounded px-2 py-1 text-[10px] font-semibold text-gray-200 focus:outline-none focus:ring-2 focus:ring-cyan-500/40"
className="w-full"
/>
</th>
<th className="px-4 py-2 text-[10px] text-gray-500 font-medium">
@ -1894,7 +1890,6 @@ export const PositionsTab = ({ botState, onManageHolding }: PositionsTabProps) =
onChange={(e: ChangeEvent<HTMLInputElement>) => setLifecycleDateFrom(e.target.value)}
controlSize="sm"
variant="muted"
className="bg-white/5 border border-white/10 rounded px-2 py-1 text-[10px] text-gray-200 focus:outline-none focus:ring-2 focus:ring-cyan-500/40"
/>
<Input
type="date"
@ -1902,7 +1897,6 @@ export const PositionsTab = ({ botState, onManageHolding }: PositionsTabProps) =
onChange={(e: ChangeEvent<HTMLInputElement>) => setLifecycleDateTo(e.target.value)}
controlSize="sm"
variant="muted"
className="bg-white/5 border border-white/10 rounded px-2 py-1 text-[10px] text-gray-200 focus:outline-none focus:ring-2 focus:ring-cyan-500/40"
/>
<div className="flex items-center gap-2">
<Button
@ -1913,7 +1907,7 @@ export const PositionsTab = ({ botState, onManageHolding }: PositionsTabProps) =
}}
variant="outline"
size="sm"
className="h-auto px-2 py-1 rounded border border-white/10 text-[9px] font-bold uppercase tracking-wider text-gray-300 hover:bg-white/5 transition-colors"
className="min-h-7 px-2 text-[9px]"
>
Clear
</Button>
@ -1922,7 +1916,7 @@ export const PositionsTab = ({ botState, onManageHolding }: PositionsTabProps) =
onClick={() => setLifecycleSortDirection((current) => current === 'desc' ? 'asc' : 'desc')}
variant="outline"
size="sm"
className="h-auto px-2 py-1 rounded border border-white/10 text-[9px] font-bold uppercase tracking-wider text-gray-300 hover:bg-white/5 transition-colors"
className="min-h-7 px-2 text-[9px]"
>
{lifecycleSortDirection === 'desc' ? 'Newest' : 'Oldest'}
</Button>