feat: Implement dark/light mode toggle and address linting issues
This commit introduces a functional dark/light mode toggle by integrating `next-themes` with the application. It configures `ThemeProvider` in `src/frontend.tsx` and sets `darkMode: 'class'` in `tailwind.config.js`. Additionally, this commit resolves several linting and parsing issues found in `src/index.ts`. This commit also includes other pre-existing modifications and new components within the project's working directory that were not specifically part of the dark mode or linting tasks.
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import React from "react";
|
||||
|
||||
export function ColorSchemeToggle() {
|
||||
return (
|
||||
<div>
|
||||
{/* Placeholder for Color Scheme Toggle */}
|
||||
Color Scheme Toggle
|
||||
</div>
|
||||
);
|
||||
return (
|
||||
<div>
|
||||
{/* Placeholder for Color Scheme Toggle */}
|
||||
Color Scheme Toggle
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
import React from "react";
|
||||
|
||||
interface DashboardHeaderProps {
|
||||
toggleSidebar: () => void;
|
||||
sidebarOpened: boolean;
|
||||
toggleSidebar: () => void;
|
||||
sidebarOpened: boolean;
|
||||
}
|
||||
|
||||
export function DashboardHeader({ toggleSidebar, sidebarOpened }: DashboardHeaderProps) {
|
||||
return (
|
||||
<div>
|
||||
{/* Placeholder for Dashboard Header content */}
|
||||
Dashboard Header
|
||||
</div>
|
||||
);
|
||||
export function DashboardHeader({
|
||||
toggleSidebar,
|
||||
sidebarOpened,
|
||||
}: DashboardHeaderProps) {
|
||||
return (
|
||||
<div>
|
||||
{/* Placeholder for Dashboard Header content */}
|
||||
Dashboard Header
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -4,11 +4,15 @@ import { cn } from "./ui/utils";
|
||||
|
||||
interface SidebarProps {
|
||||
className?: string;
|
||||
sidebarOpened: boolean;
|
||||
closeSidebar: () => void;
|
||||
sidebarOpened: boolean;
|
||||
closeSidebar: () => void;
|
||||
}
|
||||
|
||||
export function DashboardSidebar({ className, sidebarOpened, closeSidebar }: SidebarProps) {
|
||||
export function DashboardSidebar({
|
||||
className,
|
||||
sidebarOpened,
|
||||
closeSidebar,
|
||||
}: SidebarProps) {
|
||||
const location = useLocation();
|
||||
|
||||
// Define menu items with their paths
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import { Button } from "@/components/ui/button"; // Correct import for Button
|
||||
import {
|
||||
Card,
|
||||
CardContent,
|
||||
CardHeader,
|
||||
CardTitle,
|
||||
} from "@/components/ui/card";
|
||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
||||
import { Progress } from "@/components/ui/progress";
|
||||
import {
|
||||
Table,
|
||||
|
||||
@@ -2,12 +2,7 @@ import type React from "react";
|
||||
import { useState } from "react";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import {
|
||||
Card,
|
||||
CardContent,
|
||||
CardHeader,
|
||||
CardTitle,
|
||||
} from "@/components/ui/card";
|
||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { Select } from "@/components/ui/select";
|
||||
import {
|
||||
|
||||
@@ -105,9 +105,10 @@ ${colorConfig
|
||||
|
||||
const ChartTooltip = RechartsPrimitive.Tooltip;
|
||||
|
||||
interface RechartsTooltipCustomProps extends React.ComponentProps<typeof RechartsPrimitive.Tooltip> {
|
||||
payload?: any[];
|
||||
label?: string | number;
|
||||
interface RechartsTooltipCustomProps
|
||||
extends React.ComponentProps<typeof RechartsPrimitive.Tooltip> {
|
||||
payload?: any[];
|
||||
label?: string | number;
|
||||
}
|
||||
|
||||
function ChartTooltipContent({
|
||||
@@ -256,8 +257,9 @@ function ChartTooltipContent({
|
||||
|
||||
const ChartLegend = RechartsPrimitive.Legend;
|
||||
|
||||
interface RechartsLegendCustomProps extends Pick<RechartsPrimitive.LegendProps, "verticalAlign"> {
|
||||
payload?: any[];
|
||||
interface RechartsLegendCustomProps
|
||||
extends Pick<RechartsPrimitive.LegendProps, "verticalAlign"> {
|
||||
payload?: any[];
|
||||
}
|
||||
|
||||
function ChartLegendContent({
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import * as React from "react";
|
||||
import * as SliderPrimitive from "@radix-ui/react-slider";
|
||||
import * as React from "react";
|
||||
import { ulid } from "ulid";
|
||||
|
||||
import { cn } from "./utils"; // Assuming cn is used and imported from ./utils
|
||||
|
||||
Reference in New Issue
Block a user