From f02ae39b2503023c637fe1ae7a0ffa932768e1c9 Mon Sep 17 00:00:00 2001 From: Dat Nguyen Date: Tue, 13 Aug 2024 01:18:43 +0700 Subject: [PATCH] feat: revise pnl colors based on figma styles --- apps/wallet/src/components/TotalPnL.tsx | 82 +++++++------------------ 1 file changed, 21 insertions(+), 61 deletions(-) diff --git a/apps/wallet/src/components/TotalPnL.tsx b/apps/wallet/src/components/TotalPnL.tsx index 88c1cff88..1e0d02a23 100644 --- a/apps/wallet/src/components/TotalPnL.tsx +++ b/apps/wallet/src/components/TotalPnL.tsx @@ -15,41 +15,23 @@ const TotalPnL: FC = ({ value, percentage, isDarkTheme = false }) => { return ( - {isLost ? `-$${-value}` : isProfit ? `+$${value}` : null} + {isLost ? `≈ -$${-value}` : isProfit ? `≈ +$${value}` : null} - + {isLost ? `${percentage}%` : isProfit ? `+${percentage}%` : null} @@ -65,49 +47,27 @@ const styles = StyleSheet.create({ alignItems: 'center', gap: 8, }, - lightThemeProfitValue: { - color: '#60C591', - fontSize: 20, - }, - darkThemeProfitValue: { + pnlTextBase: { color: '#ffffff', - fontSize: 20, }, - lightThemeLostValue: { - color: '#AE3939', + pnlValueBase: { fontSize: 20, }, - darkThemeLostValue: { - color: '#ffffff', - fontSize: 20, + darkThemePnLText: { + color: '#babdc0', }, - lightThemeProfitPercentage: { - color: '#60C591', - }, - lightThemeLostPercentage: { - color: '#AE3939', - }, - darkThemeProfitPercentage: { - color: '#ffffff', - }, - darkThemeLostPercentage: { + lightThemePnLText: { color: '#ffffff', }, - percentageContainer: { + percentageContainerBase: { borderRadius: 4, paddingVertical: 4, paddingHorizontal: 8, }, - lightThemeProfitPercentageContainer: { - backgroundColor: '#AE393933', - }, - darkThemeProfitPercentageContainer: { - backgroundColor: '#2A9960', - }, - lightThemeLostPercentageContainer: { - backgroundColor: '#AE393933', + ProfitPercentageContainer: { + backgroundColor: '#29985F', }, - darkThemeLostPercentageContainer: { - backgroundColor: '#941200', + LostPercentageContainer: { + backgroundColor: '#DB1901', }, });