Skip to content

Commit f10d59f

Browse files
committed
fix(www): themes page
1 parent 2f869a2 commit f10d59f

File tree

4 files changed

+15
-25
lines changed

4 files changed

+15
-25
lines changed

apps/www/app/(app)/themes/page.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
import { CardsDemo } from "@/components/cards"
2+
import { ThemeWrapper } from "@/components/theme-wrapper"
23

34
import "public/registry/themes.css"
45

56
export default function ThemesPage() {
6-
return <CardsDemo />
7+
return (
8+
<ThemeWrapper>
9+
<CardsDemo />
10+
</ThemeWrapper>
11+
)
712
}

apps/www/components/cards/activity-goal.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22

33
import * as React from "react"
44
import { Minus, Plus } from "lucide-react"
5-
import { useTheme } from "next-themes"
6-
import { Bar, BarChart, ResponsiveContainer } from "recharts"
5+
import { Bar, BarChart } from "recharts"
76

8-
import { useConfig } from "@/hooks/use-config"
97
import { Button } from "@/registry/new-york/ui/button"
108
import {
119
Card,
@@ -16,7 +14,6 @@ import {
1614
CardTitle,
1715
} from "@/registry/new-york/ui/card"
1816
import { ChartConfig, ChartContainer } from "@/registry/new-york/ui/chart"
19-
import { baseColors } from "@/registry/registry-base-colors"
2017

2118
const data = [
2219
{
@@ -63,10 +60,7 @@ const data = [
6360
const chartConfig = {
6461
goal: {
6562
label: "Goal",
66-
theme: {
67-
light: "black",
68-
dark: "white",
69-
},
63+
color: "hsl(var(--primary))",
7064
},
7165
} satisfies ChartConfig
7266

apps/www/components/cards/metric.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
"use client"
22

3-
import { useTheme } from "next-themes"
4-
import { Line, LineChart, ResponsiveContainer, Tooltip } from "recharts"
3+
import { Line, LineChart } from "recharts"
54

6-
import { useConfig } from "@/hooks/use-config"
75
import {
86
Card,
97
CardContent,
@@ -17,7 +15,6 @@ import {
1715
ChartTooltip,
1816
ChartTooltipContent,
1917
} from "@/registry/new-york/ui/chart"
20-
import { baseColors } from "@/registry/registry-base-colors"
2118

2219
const data = [
2320
{
@@ -57,7 +54,7 @@ const chartConfig = {
5754
},
5855
average: {
5956
label: "Average",
60-
color: "hsl(var(--muted-foreground))",
57+
color: "hsl(var(--primary))",
6158
},
6259
} satisfies ChartConfig
6360

@@ -71,7 +68,7 @@ export function CardsMetric() {
7168
</CardDescription>
7269
</CardHeader>
7370
<CardContent className="pb-4">
74-
<ChartContainer config={chartConfig} className="h-[200px] w-full">
71+
<ChartContainer config={chartConfig} className="w-full md:h-[200px]">
7572
<LineChart
7673
data={data}
7774
margin={{
@@ -86,6 +83,7 @@ export function CardsMetric() {
8683
strokeWidth={2}
8784
dataKey="average"
8885
stroke="var(--color-average)"
86+
strokeOpacity={0.5}
8987
activeDot={{
9088
r: 6,
9189
fill: "var(--color-average)",

apps/www/components/cards/stats.tsx

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,11 @@ const data = [
4848
const chartConfig = {
4949
revenue: {
5050
label: "Revenue",
51-
theme: {
52-
light: "black",
53-
dark: "white",
54-
},
51+
color: "hsl(var(--primary))",
5552
},
5653
subscription: {
5754
label: "Subscriptions",
58-
theme: {
59-
light: "black",
60-
dark: "white",
61-
},
55+
color: "hsl(var(--primary))",
6256
},
6357
} satisfies ChartConfig
6458

@@ -88,11 +82,10 @@ export function CardsStats() {
8882
type="monotone"
8983
strokeWidth={2}
9084
dataKey="revenue"
85+
stroke="var(--color-revenue)"
9186
activeDot={{
9287
r: 6,
93-
fill: "var(--color-revenue)",
9488
}}
95-
stroke="var(--color-revenue)"
9689
/>
9790
</LineChart>
9891
</ChartContainer>

0 commit comments

Comments
 (0)