-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
53 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,29 @@ | ||
import { type FC } from 'react' | ||
|
||
import { Button } from 'flowbite-react' | ||
import { Divider } from '~/components/Divider' | ||
import { type Category } from '~/constants/categories' | ||
import { type Phase } from '~/constants/categories' | ||
|
||
import { ExpenseSelection } from './ExpenseSelection' | ||
import { NewCardButton } from './NewCardButton' | ||
|
||
interface ExpensePhaseProps { | ||
title: string | ||
categories: Category[] | ||
phase: Phase | ||
} | ||
|
||
export const ExpenseCategory: FC<ExpensePhaseProps> = ({ title, categories }) => { | ||
export const ExpensePhase: FC<ExpensePhaseProps> = ({ phase: { title, categories } }) => { | ||
return ( | ||
<div className="flex flex-col items-start gap-4 w-full"> | ||
<div className="text-gray-900 text-4xl font-semibold">{title}</div> | ||
<Divider /> | ||
<div className="w-full grid grid-cols-4 gap-6"> | ||
{categories.map((category) => ( | ||
<Button color="light" key={category.title} disabled={category.disabled}> | ||
{category.title} | ||
</Button> | ||
))} | ||
</div> | ||
<div className="w-full grid grid-cols-4 gap-6"> | ||
<NewCardButton | ||
onClick={() => { | ||
alert('test') | ||
}} | ||
/> | ||
{/* TODO: add selected items as cards here */} | ||
</div> | ||
<ExpenseSelection phase={{ title, categories }} /> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { type FC } from 'react' | ||
|
||
import { Button } from 'flowbite-react' | ||
import { type Phase } from '~/constants/categories' | ||
|
||
interface ExpenseSelectionProps { | ||
phase: Phase | ||
} | ||
|
||
export const ExpenseSelection: FC<ExpenseSelectionProps> = ({ phase }) => { | ||
return ( | ||
<div className="flex flex-col w-full"> | ||
<div className="w-full grid grid-cols-4 gap-6"> | ||
{phase.categories.map((category) => ( | ||
<Button color="light" key={category.title} disabled={category.disabled}> | ||
{category.title} | ||
</Button> | ||
))} | ||
</div> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters