Skip to content

Commit

Permalink
sidebarcategory to typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
MikesGlitch committed Nov 8, 2023
1 parent 1639b0d commit f0e6e39
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ function ExpenseGroup({
collapsed,
editingCell,
dragState,
itemPos,
MonthComponent,
onEditName,
onSave,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,30 +1,47 @@
import React, { useState } from 'react';
import React, { type CSSProperties, type Ref, useState } from 'react';

import { type CategoryEntity } from 'loot-core/src/types/models';

import CheveronDown from '../../icons/v1/CheveronDown';
import { theme } from '../../style';
import Button from '../common/Button';
import Menu from '../common/Menu';
import View from '../common/View';
import NotesButton from '../NotesButton';
import { type OnDragChangeCallback } from '../sort';
import { InputCell } from '../table';
import { Tooltip } from '../tooltips';

type SidebarCategoryProps = {
innerRef: Ref<HTMLDivElement>;
category: CategoryEntity;
dragPreview?: boolean;
dragging?: boolean;
editing: boolean;
style: CSSProperties;
borderColor: string;
isLast?: boolean;
onDragChange?: OnDragChangeCallback;
onEditName: (id: string) => void;
onSave: (group) => void;
onDelete: (id: string) => Promise<void>;
onHideNewCategory: () => void;
};

function SidebarCategory({
innerRef,
category,
dragPreview,
dragging,
editing,
style,
borderColor = theme.tableBorder,
isLast,
onDragChange,
onEditMonth,
onEditName,
onSave,
onDelete,
onHideNewCategory,
}) {
}: SidebarCategoryProps) {
const temporary = category.id === 'new';
const [menuOpen, setMenuOpen] = useState(false);

Expand Down
2 changes: 1 addition & 1 deletion upcoming-release-notes/1879.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ category: Maintenance
authors: [MikesGlitch]
---

Convert BudgetSummaries, MonthPicker components to Typescript.
Convert BudgetSummaries, MonthPicker, SidebarCategory components to Typescript.

0 comments on commit f0e6e39

Please sign in to comment.