Files
zellyy-finance/src/components/analytics/PeriodSelector.tsx
gpt-engineer-app[bot] 55296641c9 Investigate layout width issue
The layout width is not behaving as expected. Further investigation is needed to identify the cause.
2025-03-16 06:02:05 +00:00

43 lines
977 B
TypeScript

import React from 'react';
import { ChevronLeft, ChevronRight } from 'lucide-react';
import { useIsMobile } from '@/hooks/use-mobile';
interface PeriodSelectorProps {
selectedPeriod: string;
onPrevPeriod: () => void;
onNextPeriod: () => void;
}
const PeriodSelector: React.FC<PeriodSelectorProps> = ({
selectedPeriod,
onPrevPeriod,
onNextPeriod
}) => {
const isMobile = useIsMobile();
return (
<div className="flex items-center justify-between mb-6 w-full">
<button
className="neuro-flat p-2 rounded-full"
onClick={onPrevPeriod}
>
<ChevronLeft size={20} />
</button>
<div className="flex items-center">
<span className="font-medium text-lg">{selectedPeriod}</span>
</div>
<button
className="neuro-flat p-2 rounded-full"
onClick={onNextPeriod}
>
<ChevronRight size={20} />
</button>
</div>
);
};
export default PeriodSelector;