Skip to content

Commit 2711cb0

Browse files
committed
refactor design
1 parent 1311e71 commit 2711cb0

2 files changed

Lines changed: 81 additions & 17 deletions

File tree

src/pages/stakingPage/components/RewardsCard.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ export const RewardsCard = ({ data, refetchData }: RewardsCardProps): JSX.Elemen
2424
const [isClaiming, setIsClaiming] = useState(false);
2525
const [isCompounding, setIsCompounding] = useState(false);
2626
const [grixPrice, setGrixPrice] = useState<number | null>(null);
27-
const { totalStaked } = useVesting();
2827
const toast = useToast();
2928

3029
// Fetch GRIX price from CoinGecko

src/pages/stakingPage/components/StakeUnstakeModal.tsx

Lines changed: 81 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,39 @@ export const StakeUnstakeModal: React.FC<StakeUnstakeModalProps> = ({
147147
<Button
148148
key={percentage}
149149
onClick={() => handlePercentageClick(percentage)}
150-
bg="#1E2328"
151-
color="white"
152-
size="md"
150+
variant="outline"
151+
bg="gray.800"
152+
color="gray.300"
153+
borderColor="gray.600"
154+
size="sm"
153155
flex={1}
156+
height="32px"
157+
fontSize="xs"
158+
fontWeight="500"
154159
isDisabled={!hasBalance}
155-
opacity={hasBalance ? 1 : 0.5}
156-
_hover={{ bg: hasBalance ? '#2A3038' : '#1E2328' }}
157-
_active={{ bg: hasBalance ? '#2A3038' : '#1E2328' }}
160+
_hover={{
161+
bg: hasBalance ? 'gray.700' : 'gray.800',
162+
borderColor: hasBalance ? 'gray.500' : 'gray.600',
163+
color: hasBalance ? 'white' : 'gray.300',
164+
transform: hasBalance ? 'translateY(-1px)' : 'none',
165+
boxShadow: hasBalance ? 'sm' : 'none'
166+
}}
167+
_active={{
168+
bg: hasBalance ? 'gray.600' : 'gray.800',
169+
transform: hasBalance ? 'translateY(0)' : 'none'
170+
}}
171+
_disabled={{
172+
opacity: 0.5,
173+
cursor: 'not-allowed',
174+
_hover: {
175+
bg: 'gray.800',
176+
borderColor: 'gray.600',
177+
color: 'gray.300',
178+
transform: 'none',
179+
boxShadow: 'none'
180+
}
181+
}}
182+
transition="all 0.2s"
158183
>
159184
{percentage}%
160185
</Button>
@@ -181,15 +206,35 @@ export const StakeUnstakeModal: React.FC<StakeUnstakeModalProps> = ({
181206
isLoading={isApproving}
182207
loadingText="Approving"
183208
onClick={handleApprove}
184-
bg="#2F6C60"
209+
variant="solid"
210+
bg="teal.500"
185211
color="white"
186-
size="lg"
212+
size="md"
187213
width="full"
188-
height="48px"
214+
height="40px"
189215
fontSize="sm"
216+
fontWeight="500"
190217
isDisabled={!isAmountValid()}
191-
_hover={{ bg: '#2A5F54' }}
192-
_active={{ bg: '#264F46' }}
218+
_hover={{
219+
bg: 'teal.600',
220+
transform: 'translateY(-1px)',
221+
boxShadow: 'md'
222+
}}
223+
_active={{
224+
bg: 'teal.700',
225+
transform: 'translateY(0)'
226+
}}
227+
_disabled={{
228+
bg: 'gray.700',
229+
color: 'gray.500',
230+
cursor: 'not-allowed',
231+
_hover: {
232+
bg: 'gray.700',
233+
transform: 'none',
234+
boxShadow: 'none'
235+
}
236+
}}
237+
transition="all 0.2s"
193238
>
194239
Approve
195240
</Button>
@@ -198,15 +243,35 @@ export const StakeUnstakeModal: React.FC<StakeUnstakeModalProps> = ({
198243
isLoading={isLoading}
199244
loadingText={isStakeMode ? 'Staking' : 'Unstaking'}
200245
onClick={onSubmit}
201-
bg="#2F6C60"
246+
variant="solid"
247+
bg="teal.500"
202248
color="white"
203-
size="lg"
249+
size="md"
204250
width="full"
205-
height="48px"
251+
height="40px"
206252
fontSize="sm"
253+
fontWeight="500"
207254
isDisabled={!isAmountValid() || !amount}
208-
_hover={{ bg: '#2A5F54' }}
209-
_active={{ bg: '#264F46' }}
255+
_hover={{
256+
bg: 'teal.600',
257+
transform: 'translateY(-1px)',
258+
boxShadow: 'md'
259+
}}
260+
_active={{
261+
bg: 'teal.700',
262+
transform: 'translateY(0)'
263+
}}
264+
_disabled={{
265+
bg: 'gray.700',
266+
color: 'gray.500',
267+
cursor: 'not-allowed',
268+
_hover: {
269+
bg: 'gray.700',
270+
transform: 'none',
271+
boxShadow: 'none'
272+
}
273+
}}
274+
transition="all 0.2s"
210275
>
211276
{isStakeMode ? 'Stake' : 'Unstake'}
212277
</Button>

0 commit comments

Comments
 (0)