Skip to content

Commit

Permalink
added some children for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriele Granello committed Jan 8, 2025
1 parent f5983b1 commit a406040
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
17 changes: 11 additions & 6 deletions app/components/ui/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,17 @@ const Dashboard: React.FC<DashboardProps> = ({ data }) => {
return (
<div className="snap-container">
<div className="snap-scroll" ref={scrollContainerRef}>
<GraphCard title="How much would a Fairhold home cost?" />
<GraphCard title="How much would it cost every month?" />
<GraphCard title="How would the cost change over my life?" />
<GraphCard title="How much could I sell it for?" />
<GraphCard title="What difference would Fairhold make to me, my community, and the world?" />
<GraphCard title="What would you choose?" />
<GraphCard title="How much would a Fairhold home cost?">
<span className="text-red-500">Not much</span>
</GraphCard>

<GraphCard title="How much would it cost every month?">
<span className="text-red-500">in theory less than Freehold</span>
</GraphCard>
<GraphCard title="How would the cost change over my life?"></GraphCard>
<GraphCard title="How much could I sell it for?"></GraphCard>
<GraphCard title="What difference would Fairhold make to me, my community, and the world?"></GraphCard>
<GraphCard title="What would you choose?"></GraphCard>
</div>

<div className="fixed bottom-4 right-4">
Expand Down
3 changes: 2 additions & 1 deletion app/components/ui/GraphCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ type Props = React.PropsWithChildren<{
title: string;
}>;

const GraphCard: React.FC<Props> = ({ title }) => {
const GraphCard: React.FC<Props> = ({ title, children }) => {
return (
<div className="h-screen snap-start">
<span className="text-2xl text-black">{title}</span>
{children && <div className="mt-4">{children}</div>}
</div>
);
};
Expand Down

0 comments on commit a406040

Please sign in to comment.