Skip to content

Commit

Permalink
add: interface
Browse files Browse the repository at this point in the history
  • Loading branch information
bombnp committed Jul 16, 2023
1 parent 15f8696 commit adfa69f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/atoms/interface.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { type Item } from '~/constants/categories'

interface SelectedCategoryAtom {
title: string
selectedItems: Item[]
}

interface SelectedExpense {
categories: SelectedCategoryAtom[]
}
6 changes: 6 additions & 0 deletions src/constants/categories.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
export interface Item {
title: string
cost: number
}

export interface Category {
title: string
disabled: boolean
items?: Item[]
}

export const preBirthCategories: Category[] = [
Expand Down

0 comments on commit adfa69f

Please sign in to comment.