Skip to content

Commit 19e3aff

Browse files
committed
orb style
1 parent 8896280 commit 19e3aff

File tree

6 files changed

+919
-10
lines changed

6 files changed

+919
-10
lines changed

apps/web/src/app/[id]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export default function AppPage({ params }: { params: Promise<{ id: string }> })
5757
const Component = toolState === 'configured' ? tool_comps.Dashboard : tool_comps.Readme;
5858

5959
return (
60-
<div className="py-6">
60+
<div className="py-6 mb-6 pb-6">
6161
<div className="flex flex-col gap-6">
6262
<div className="flex items-center gap-2">
6363
<h1 className="text-2xl font-bold">{TOOLS[id].name}</h1>

apps/web/src/components/tools/orb/dashboard.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,8 @@ export default function OrbDashboard() {
9393
{/* Charts Grid */}
9494
<div className="grid gap-4 grid-cols-1">
9595
<SubsChart data={subsTimeSeriesData} />
96-
9796
</div>
98-
<div className="grid gap-4 md:grid-cols-2">
97+
<div className="grid gap-4 md:grid-cols-2 max-h-[400px]">
9998
<SubsByPlanTsChart data={subsByPlanTsData} />
10099
<SubsByPlanChart data={subsByPlanData} />
101100
</div>

apps/web/src/components/tools/orb/sub-by-plan-chart.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export function SubsByPlanChart({ data: rawData }: SubsByPlanChartData) {
6060
<CardContent className="flex-1 pb-0">
6161
<ChartContainer
6262
config={chartConfig}
63-
className="mx-auto aspect-square max-h-[300px]"
63+
className="mx-auto"
6464
>
6565
<PieChart>
6666
<Pie data={data} dataKey="subs" nameKey="plan" />

apps/web/src/components/tools/orb/sub-by-plan-ts-chart.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ export function SubsByPlanTsChart({ data: rawData }: SubsByPlanTsChartData) {
6464
margin={{
6565
left: 12,
6666
right: 12,
67+
top: 12,
68+
bottom: 12,
6769
}}
6870
>
6971
<XAxis
@@ -89,14 +91,15 @@ export function SubsByPlanTsChart({ data: rawData }: SubsByPlanTsChartData) {
8991
}}
9092
/>
9193
<ChartTooltip cursor={false} content={<ChartTooltipContent />} />
92-
{planNames.map((plan) => (
94+
{planNames.map((plan, i) => (
9395
<Line
9496
key={plan}
9597
type="monotone"
9698
dataKey={plan}
9799
name={plan}
98100
strokeWidth={2}
99101
dot={false}
102+
stroke={`hsl(var(--chart-${i}))`}
100103
/>
101104
))}
102105
</LineChart>

apps/web/src/components/tools/orb/subs-chart.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export interface SubsChartProps {
2525

2626
const chartConfig = {
2727
invoices: {
28-
color: "hsl(var(--primary))",
28+
color: "hsl(var(--chart-1))",
2929
label: "New Subscriptions",
3030
},
3131
} satisfies ChartConfig
@@ -43,6 +43,8 @@ export function SubsChart({ data }: SubsChartProps) {
4343
margin={{
4444
left: 12,
4545
right: 12,
46+
top: 12,
47+
bottom: 12
4648
}}
4749
>
4850
<XAxis
@@ -77,11 +79,9 @@ export function SubsChart({ data }: SubsChartProps) {
7779
strokeWidth={2}
7880
activeDot={{
7981
r: 4,
80-
style: { fill: "hsl(var(--primary))" },
81-
}}
82-
style={{
83-
stroke: "hsl(var(--primary))",
82+
style: { fill: chartConfig.invoices.color },
8483
}}
84+
stroke={chartConfig.invoices.color}
8585
/>
8686
</LineChart>
8787
</ChartContainer>

0 commit comments

Comments
 (0)