website refactor
This commit is contained in:
@@ -2,8 +2,11 @@
|
||||
|
||||
import { motion, useReducedMotion, useMotionValue, useSpring, useTransform } from 'framer-motion';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { Box } from '@/ui/Box';
|
||||
import { Text } from '@/ui/Text';
|
||||
import { Stack } from '@/ui/Stack';
|
||||
|
||||
export default function DriverProfileMockup() {
|
||||
export function DriverProfileMockup() {
|
||||
const shouldReduceMotion = useReducedMotion();
|
||||
const [isMobile, setIsMobile] = useState(false);
|
||||
|
||||
@@ -23,64 +26,79 @@ export default function DriverProfileMockup() {
|
||||
|
||||
if (isMobile) {
|
||||
return (
|
||||
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite rounded-lg p-3 overflow-hidden">
|
||||
<div className="space-y-4">
|
||||
<div>
|
||||
<div className="flex items-center justify-between mb-2">
|
||||
<div className="flex items-center gap-3">
|
||||
<div className="relative h-12 w-12 rounded-full border-2 border-primary-blue/50 overflow-hidden bg-charcoal-outline">
|
||||
<div className="absolute inset-0 flex items-center justify-center text-2xl">🏎️</div>
|
||||
</div>
|
||||
<div>
|
||||
<div className="text-base font-bold text-white">Driver Profile</div>
|
||||
<div className="text-xs text-white/50">Cross-league</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="text-2xl font-bold text-charcoal-outline">#33</div>
|
||||
</div>
|
||||
<Box position="relative" fullWidth fullHeight bg="bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite" rounded="lg" p={3} overflow="hidden">
|
||||
<Stack gap={4}>
|
||||
<Box>
|
||||
<Box display="flex" alignItems="center" justifyContent="between" mb={2}>
|
||||
<Box display="flex" alignItems="center" gap={3}>
|
||||
<Box position="relative" h="12" w="12" rounded="full" border borderWidth="2px" borderColor="border-primary-blue/50" overflow="hidden" bg="bg-charcoal-outline">
|
||||
<Box position="absolute" inset="0" display="flex" alignItems="center" justifyContent="center">
|
||||
<Text size="2xl">🏎️</Text>
|
||||
</Box>
|
||||
</Box>
|
||||
<Box>
|
||||
<Text weight="bold" color="text-white" block>Driver Profile</Text>
|
||||
<Text size="xs" color="text-white" opacity={0.5} block>Cross-league</Text>
|
||||
</Box>
|
||||
</Box>
|
||||
<Text size="2xl" weight="bold" color="text-charcoal-outline">#33</Text>
|
||||
</Box>
|
||||
|
||||
<div className="relative h-2 bg-charcoal-outline rounded-full overflow-hidden mb-1">
|
||||
<div
|
||||
className="absolute inset-y-0 left-0 bg-gradient-to-r from-primary-blue to-neon-aqua rounded-full"
|
||||
<Box position="relative" h="2" bg="bg-charcoal-outline" rounded="full" overflow="hidden" mb={1}>
|
||||
<Box
|
||||
position="absolute"
|
||||
insetY="0"
|
||||
left="0"
|
||||
bg="bg-gradient-to-r from-primary-blue to-neon-aqua"
|
||||
rounded="full"
|
||||
// eslint-disable-next-line gridpilot-rules/component-classification
|
||||
style={{ width: '86%' }}
|
||||
/>
|
||||
</div>
|
||||
<div className="flex justify-end">
|
||||
<span className="text-xs text-gray-400">2150 GP Rating</span>
|
||||
</div>
|
||||
</div>
|
||||
</Box>
|
||||
<Box display="flex" justifyContent="end">
|
||||
<Text size="xs" color="text-gray-400">2150 GP Rating</Text>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
<div>
|
||||
<div className="text-sm font-semibold text-white mb-2">Career Stats</div>
|
||||
<div className="grid grid-cols-3 gap-2">
|
||||
<Box>
|
||||
<Text size="sm" weight="semibold" color="text-white" mb={2} block>Career Stats</Text>
|
||||
<Box display="grid" gridCols={3} gap={2}>
|
||||
{stats.slice(0, 3).map((stat) => (
|
||||
<div
|
||||
<Box
|
||||
key={stat.label}
|
||||
className="bg-iron-gray/50 border border-charcoal-outline rounded-lg p-2 text-center"
|
||||
bg="bg-iron-gray/50"
|
||||
border
|
||||
borderColor="border-charcoal-outline"
|
||||
rounded="lg"
|
||||
p={2}
|
||||
textAlign="center"
|
||||
>
|
||||
<div className="text-base font-bold text-white font-mono">
|
||||
<Text weight="bold" color="text-white" font="mono" block>
|
||||
{stat.value}{stat.suffix}
|
||||
</div>
|
||||
<div className="text-xs text-gray-400 mt-0.5">{stat.label}</div>
|
||||
</div>
|
||||
</Text>
|
||||
<Text size="xs" color="text-gray-400" mt={0.5} block>{stat.label}</Text>
|
||||
</Box>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
<div>
|
||||
<div className="text-sm font-semibold text-white mb-2">Recent Form</div>
|
||||
<div className="h-16 bg-iron-gray/30 border border-charcoal-outline rounded-lg p-2 flex items-end gap-1">
|
||||
<Box>
|
||||
<Text size="sm" weight="semibold" color="text-white" mb={2} block>Recent Form</Text>
|
||||
<Box h="16" bg="bg-iron-gray/30" border borderColor="border-charcoal-outline" rounded="lg" p={2} display="flex" alignItems="end" gap={1}>
|
||||
{formData.slice(-6).map((value, i) => (
|
||||
<div
|
||||
<Box
|
||||
key={i}
|
||||
className="flex-1 bg-gradient-to-t from-performance-green to-primary-blue rounded-sm"
|
||||
flexGrow={1}
|
||||
bg="bg-gradient-to-t from-performance-green to-primary-blue"
|
||||
rounded="sm"
|
||||
// eslint-disable-next-line gridpilot-rules/component-classification
|
||||
style={{ height: `${value}%` }}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Box>
|
||||
</Box>
|
||||
</Stack>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -102,60 +120,83 @@ export default function DriverProfileMockup() {
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite rounded-lg p-1.5 sm:p-3 md:p-5 lg:p-8 overflow-hidden">
|
||||
<motion.div
|
||||
<Box position="relative" fullWidth fullHeight bg="bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite" rounded="lg" p={{ base: 1.5, sm: 3, md: 5, lg: 8 }} overflow="hidden">
|
||||
<Box
|
||||
as={motion.div}
|
||||
initial={{ opacity: 0, y: shouldReduceMotion ? 0 : -10 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
className="mb-1.5 sm:mb-3 md:mb-4 lg:mb-6"
|
||||
mb={{ base: 1.5, sm: 3, md: 4, lg: 6 }}
|
||||
>
|
||||
<div className="flex items-center justify-between mb-1.5 sm:mb-2 md:mb-3 lg:mb-4">
|
||||
<div className="flex items-center gap-1.5 sm:gap-2 md:gap-3 lg:gap-4">
|
||||
<div className="relative h-8 w-8 sm:h-10 sm:w-10 md:h-12 md:w-12 lg:h-16 lg:w-16 rounded-full border-2 border-primary-blue/50 overflow-hidden bg-charcoal-outline">
|
||||
<div className="absolute inset-0 flex items-center justify-center text-base sm:text-xl md:text-2xl lg:text-3xl">🏎️</div>
|
||||
</div>
|
||||
<div>
|
||||
<div className="text-sm sm:text-base md:text-lg lg:text-xl font-bold text-white mb-1 sm:mb-1.5 md:mb-2">Driver Profile</div>
|
||||
<div className="text-[8px] sm:text-[10px] md:text-xs text-white/50">Cross-league racing identity</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="text-xl sm:text-2xl md:text-3xl lg:text-4xl font-bold text-charcoal-outline">#33</div>
|
||||
</div>
|
||||
<Box display="flex" alignItems="center" justifyContent="between" mb={{ base: 1.5, sm: 2, md: 3, lg: 4 }}>
|
||||
<Box display="flex" alignItems="center" gap={{ base: 1.5, sm: 2, md: 3, lg: 4 }}>
|
||||
<Box position="relative" h={{ base: 8, sm: 10, md: 12, lg: 16 }} w={{ base: 8, sm: 10, md: 12, lg: 16 }} rounded="full" border borderWidth="2px" borderColor="border-primary-blue/50" overflow="hidden" bg="bg-charcoal-outline">
|
||||
<Box position="absolute" inset="0" display="flex" alignItems="center" justifyContent="center">
|
||||
<Text size={{ base: 'base', sm: 'xl', md: '2xl', lg: '3xl' }}>🏎️</Text>
|
||||
</Box>
|
||||
</Box>
|
||||
<Box>
|
||||
<Text size={{ base: 'sm', sm: 'base', md: 'lg', lg: 'xl' }} weight="bold" color="text-white" mb={{ base: 1, sm: 1.5, md: 2 }} block>Driver Profile</Text>
|
||||
<Text
|
||||
// eslint-disable-next-line gridpilot-rules/component-classification
|
||||
style={{ fontSize: '10px' }}
|
||||
color="text-white"
|
||||
opacity={0.5}
|
||||
block
|
||||
>
|
||||
Cross-league racing identity
|
||||
</Text>
|
||||
</Box>
|
||||
</Box>
|
||||
<Text size={{ base: 'xl', sm: '2xl', md: '3xl', lg: '4xl' }} weight="bold" color="text-charcoal-outline">#33</Text>
|
||||
</Box>
|
||||
|
||||
<div className="flex flex-wrap items-center gap-1 sm:gap-2 md:gap-3 lg:gap-4 mb-1 sm:mb-1.5 md:mb-2">
|
||||
<div className="text-[8px] sm:text-[10px] md:text-xs text-gray-400">GridPilot Rating:</div>
|
||||
<Box display="flex" flexWrap="wrap" alignItems="center" gap={{ base: 1, sm: 2, md: 3, lg: 4 }} mb={{ base: 1, sm: 1.5, md: 2 }}>
|
||||
<Text size="xs" color="text-gray-400">GridPilot Rating:</Text>
|
||||
<AnimatedRating shouldReduceMotion={shouldReduceMotion ?? false} value={2150} />
|
||||
<div className="text-[8px] sm:text-[10px] md:text-xs text-gray-400">iRating:</div>
|
||||
<Text size="xs" color="text-gray-400">iRating:</Text>
|
||||
<AnimatedRating shouldReduceMotion={shouldReduceMotion ?? false} value={3200} />
|
||||
</div>
|
||||
</Box>
|
||||
|
||||
<div className="relative h-1.5 sm:h-2 md:h-2.5 lg:h-3 bg-charcoal-outline rounded-full overflow-hidden">
|
||||
<motion.div
|
||||
className="absolute inset-y-0 left-0 bg-gradient-to-r from-primary-blue to-neon-aqua rounded-full"
|
||||
<Box position="relative" h={{ base: 1.5, sm: 2, md: 2.5, lg: 3 }} bg="bg-charcoal-outline" rounded="full" overflow="hidden">
|
||||
<Box
|
||||
as={motion.div}
|
||||
position="absolute"
|
||||
insetY="0"
|
||||
left="0"
|
||||
bg="bg-gradient-to-r from-primary-blue to-neon-aqua"
|
||||
rounded="full"
|
||||
initial={{ width: '0%' }}
|
||||
animate={{ width: '86%' }}
|
||||
transition={{ delay: shouldReduceMotion ? 0 : 0.4, duration: 0.8, ease: 'easeOut' }}
|
||||
/>
|
||||
</div>
|
||||
<div className="flex justify-end mt-1">
|
||||
<span className="text-[8px] sm:text-[10px] md:text-xs text-gray-400">86%</span>
|
||||
</div>
|
||||
</motion.div>
|
||||
</Box>
|
||||
<Box display="flex" justifyContent="end" mt={1}>
|
||||
<Text size="xs" color="text-gray-400">86%</Text>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
<motion.div
|
||||
<Box
|
||||
as={motion.div}
|
||||
variants={containerVariants}
|
||||
initial="hidden"
|
||||
animate="visible"
|
||||
className="mb-1.5 sm:mb-3 md:mb-4 lg:mb-6"
|
||||
mb={{ base: 1.5, sm: 3, md: 4, lg: 6 }}
|
||||
>
|
||||
<div className="text-[9px] sm:text-xs md:text-sm font-semibold text-white mb-1">Career Statistics</div>
|
||||
<div className="text-[8px] sm:text-[10px] md:text-xs text-white/50 mb-1 sm:mb-2 md:mb-3">Aggregated across all leagues</div>
|
||||
<Text size="sm" weight="semibold" color="text-white" mb={1} block>Career Statistics</Text>
|
||||
<Text size="xs" color="text-white" opacity={0.5} mb={{ base: 1, sm: 2, md: 3 }} block>Aggregated across all leagues</Text>
|
||||
|
||||
<div className="grid grid-cols-2 md:grid-cols-5 gap-1.5 sm:gap-2 md:gap-3">
|
||||
<Box display="grid" gridCols={{ base: 2, md: 5 }} gap={{ base: 1.5, sm: 2, md: 3 }}>
|
||||
{stats.map((stat, index) => (
|
||||
<motion.div
|
||||
<Box
|
||||
key={stat.label}
|
||||
as={motion.div}
|
||||
variants={itemVariants}
|
||||
className="bg-iron-gray/50 border border-charcoal-outline rounded-lg p-1.5 sm:p-2 md:p-3 text-center"
|
||||
bg="bg-iron-gray/50"
|
||||
border
|
||||
borderColor="border-charcoal-outline"
|
||||
rounded="lg"
|
||||
p={{ base: 1.5, sm: 2, md: 3 }}
|
||||
textAlign="center"
|
||||
>
|
||||
<AnimatedCounter
|
||||
value={stat.value}
|
||||
@@ -163,26 +204,30 @@ export default function DriverProfileMockup() {
|
||||
delay={index * 0.1}
|
||||
suffix={stat.suffix ?? ''}
|
||||
/>
|
||||
<div className="text-[8px] sm:text-[10px] md:text-xs text-gray-400 mt-0.5">{stat.label}</div>
|
||||
</motion.div>
|
||||
<Text size="xs" color="text-gray-400" mt={0.5} block>{stat.label}</Text>
|
||||
</Box>
|
||||
))}
|
||||
</div>
|
||||
</motion.div>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
<motion.div
|
||||
<Box
|
||||
as={motion.div}
|
||||
initial={{ opacity: 0, y: shouldReduceMotion ? 0 : 10 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ delay: shouldReduceMotion ? 0 : 0.6 }}
|
||||
className="mb-1.5 sm:mb-3 md:mb-4 lg:mb-6"
|
||||
mb={{ base: 1.5, sm: 3, md: 4, lg: 6 }}
|
||||
>
|
||||
<div className="text-[9px] sm:text-xs md:text-sm font-semibold text-white mb-1">Recent Form</div>
|
||||
<div className="text-[8px] sm:text-[10px] md:text-xs text-white/50 mb-1 sm:mb-2 md:mb-3">Performance trend over last 10 races</div>
|
||||
<Text size="sm" weight="semibold" color="text-white" mb={1} block>Recent Form</Text>
|
||||
<Text size="xs" color="text-white" opacity={0.5} mb={{ base: 1, sm: 2, md: 3 }} block>Performance trend over last 10 races</Text>
|
||||
|
||||
<div className="h-12 sm:h-16 md:h-20 bg-iron-gray/30 border border-charcoal-outline rounded-lg p-1.5 sm:p-2 md:p-3 flex items-end gap-0.5">
|
||||
<Box h={{ base: 12, sm: 16, md: 20 }} bg="bg-iron-gray/30" border borderColor="border-charcoal-outline" rounded="lg" p={{ base: 1.5, sm: 2, md: 3 }} display="flex" alignItems="end" gap={0.5}>
|
||||
{formData.map((value, i) => (
|
||||
<motion.div
|
||||
<Box
|
||||
key={i}
|
||||
className="flex-1 bg-gradient-to-t from-performance-green to-primary-blue rounded-sm"
|
||||
as={motion.div}
|
||||
flexGrow={1}
|
||||
bg="bg-gradient-to-t from-performance-green to-primary-blue"
|
||||
rounded="sm"
|
||||
initial={{ height: 0 }}
|
||||
animate={{ height: `${value}%` }}
|
||||
transition={{
|
||||
@@ -192,67 +237,76 @@ export default function DriverProfileMockup() {
|
||||
}}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
<div className="flex justify-between mt-0.5 text-[8px] sm:text-[10px] md:text-xs text-gray-500">
|
||||
<span>Last 10 races</span>
|
||||
<span>Recent</span>
|
||||
</div>
|
||||
</motion.div>
|
||||
</Box>
|
||||
<Box display="flex" justifyContent="between" mt={0.5}>
|
||||
<Text size="xs" color="text-gray-500">Last 10 races</Text>
|
||||
<Text size="xs" color="text-gray-500">Recent</Text>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
<motion.div
|
||||
<Box
|
||||
as={motion.div}
|
||||
initial={{ opacity: 0, y: shouldReduceMotion ? 0 : 10 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ delay: shouldReduceMotion ? 0 : 0.8 }}
|
||||
>
|
||||
<div className="text-[9px] sm:text-xs md:text-sm font-semibold text-white mb-1">Teams</div>
|
||||
<div className="text-[8px] sm:text-[10px] md:text-xs text-white/50 mb-1 sm:mb-2 md:mb-3">Current and past team memberships</div>
|
||||
<Text size="sm" weight="semibold" color="text-white" mb={1} block>Teams</Text>
|
||||
<Text size="xs" color="text-white" opacity={0.5} mb={{ base: 1, sm: 2, md: 3 }} block>Current and past team memberships</Text>
|
||||
|
||||
<div className="space-y-1 sm:space-y-1.5 md:space-y-2">
|
||||
<Stack gap={{ base: 1, sm: 1.5, md: 2 }}>
|
||||
{[
|
||||
{ team: 'Red Bull Racing', status: 'Current', color: 'primary-blue' },
|
||||
{ team: 'Mercedes AMG', status: '2023', color: 'charcoal-outline' }
|
||||
].map((team, i) => (
|
||||
<motion.div
|
||||
<Box
|
||||
key={team.team}
|
||||
as={motion.div}
|
||||
initial={{ opacity: 0, x: shouldReduceMotion ? 0 : -10 }}
|
||||
animate={{ opacity: 1, x: 0 }}
|
||||
transition={{ delay: shouldReduceMotion ? 0 : 0.9 + i * 0.1 }}
|
||||
className="flex items-center justify-between bg-iron-gray/30 border border-charcoal-outline rounded-lg p-1 sm:p-1.5 md:p-2 text-[10px] sm:text-xs md:text-sm"
|
||||
display="flex"
|
||||
alignItems="center"
|
||||
justifyContent="between"
|
||||
bg="bg-iron-gray/30"
|
||||
border
|
||||
borderColor="border-charcoal-outline"
|
||||
rounded="lg"
|
||||
p={{ base: 1, sm: 1.5, md: 2 }}
|
||||
>
|
||||
<div className="flex items-center gap-2 sm:gap-3">
|
||||
<div className="h-5 w-5 sm:h-6 sm:w-6 md:h-8 md:w-8 rounded border border-primary-blue/30 bg-charcoal-outline flex items-center justify-center text-sm sm:text-base md:text-lg">
|
||||
🏁
|
||||
</div>
|
||||
<div className="h-1.5 sm:h-2 md:h-3 w-16 sm:w-20 md:w-32 bg-white/10 rounded"></div>
|
||||
</div>
|
||||
<span className={`text-[8px] sm:text-[10px] md:text-xs px-1 sm:px-1.5 md:px-2 py-0.5 rounded ${
|
||||
team.status === 'Current'
|
||||
? 'bg-primary-blue/20 text-primary-blue'
|
||||
: 'bg-charcoal-outline text-gray-400'
|
||||
}`}>
|
||||
{team.status}
|
||||
</span>
|
||||
</motion.div>
|
||||
<Box display="flex" alignItems="center" gap={{ base: 2, sm: 3 }}>
|
||||
<Box h={{ base: 5, sm: 6, md: 8 }} w={{ base: 5, sm: 6, md: 8 }} rounded="sm" border borderColor="border-primary-blue/30" bg="bg-charcoal-outline" display="flex" alignItems="center" justifyContent="center">
|
||||
<Text size={{ base: 'sm', sm: 'base', md: 'lg' }}>🏁</Text>
|
||||
</Box>
|
||||
<Box h={{ base: 1.5, sm: 2, md: 3 }} w={{ base: 16, sm: 20, md: 32 }} bg="bg-white/10" rounded="sm" />
|
||||
</Box>
|
||||
<Box as="span" px={{ base: 1, sm: 1.5, md: 2 }} py={0.5} rounded="sm" bg={team.status === 'Current' ? 'bg-primary-blue/20' : 'bg-charcoal-outline'}>
|
||||
<Text size="xs" color={team.status === 'Current' ? 'text-primary-blue' : 'text-gray-400'}>
|
||||
{team.status}
|
||||
</Text>
|
||||
</Box>
|
||||
</Box>
|
||||
))}
|
||||
</div>
|
||||
</Stack>
|
||||
|
||||
<motion.div
|
||||
<Box
|
||||
as={motion.div}
|
||||
initial={{ opacity: 0 }}
|
||||
animate={{ opacity: 1 }}
|
||||
transition={{ delay: shouldReduceMotion ? 0 : 1.2 }}
|
||||
className="mt-2 sm:mt-3 md:mt-4 text-center text-[8px] sm:text-[10px] md:text-xs text-gray-400"
|
||||
mt={{ base: 2, sm: 3, md: 4 }}
|
||||
textAlign="center"
|
||||
>
|
||||
Active in 3 leagues
|
||||
</motion.div>
|
||||
</motion.div>
|
||||
</div>
|
||||
<Text size="xs" color="text-gray-400">Active in 3 leagues</Text>
|
||||
</Box>
|
||||
</Box>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
||||
function AnimatedRating({ shouldReduceMotion, value }: { shouldReduceMotion: boolean; value: number }) {
|
||||
const count = useMotionValue(0);
|
||||
const rounded = useTransform(count, (v: number) => Math.round(v));
|
||||
const spring = useSpring(count, { stiffness: 50, damping: 25 });
|
||||
const rounded = useTransform(spring, (v: number) => Math.round(v));
|
||||
|
||||
useEffect(() => {
|
||||
if (shouldReduceMotion) {
|
||||
@@ -264,9 +318,9 @@ function AnimatedRating({ shouldReduceMotion, value }: { shouldReduceMotion: boo
|
||||
}, [shouldReduceMotion, count, value]);
|
||||
|
||||
return (
|
||||
<motion.span className="text-sm sm:text-base md:text-lg font-bold text-primary-blue font-mono">
|
||||
{shouldReduceMotion ? value : <motion.span>{rounded}</motion.span>}
|
||||
</motion.span>
|
||||
<Box as={motion.span} weight="bold" color="text-primary-blue" font="mono" size={{ base: 'sm', sm: 'base', md: 'lg' }}>
|
||||
{shouldReduceMotion ? value : <Box as={motion.span}>{rounded}</Box>}
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -294,8 +348,8 @@ function AnimatedCounter({
|
||||
}, [shouldReduceMotion, count, value, delay]);
|
||||
|
||||
return (
|
||||
<div className="text-sm sm:text-base md:text-lg lg:text-xl font-bold text-white font-mono">
|
||||
{shouldReduceMotion ? value : <motion.span>{rounded}</motion.span>}{suffix}
|
||||
</div>
|
||||
<Box weight="bold" color="text-white" font="mono" size={{ base: 'sm', sm: 'base', md: 'lg', lg: 'xl' }}>
|
||||
{shouldReduceMotion ? value : <Box as={motion.span}>{rounded}</Box>}{suffix}
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user