diff --git a/packages/desktop-client/src/components/autocomplete/Autocomplete.tsx b/packages/desktop-client/src/components/autocomplete/Autocomplete.tsx index 8a903955dfc..f6ea70b82d7 100644 --- a/packages/desktop-client/src/components/autocomplete/Autocomplete.tsx +++ b/packages/desktop-client/src/components/autocomplete/Autocomplete.tsx @@ -164,7 +164,7 @@ type SingleAutocompleteProps = { openOnFocus?: boolean; getHighlightedIndex?: (suggestions) => number | null; highlightFirst?: boolean; - onUpdate: (id: unknown, value: string) => void; + onUpdate?: (id: unknown, value: string) => void; strict?: boolean; onSelect: (id: unknown, value: string) => void; tableBehavior?: boolean; diff --git a/packages/desktop-client/src/components/common/InlineField.tsx b/packages/desktop-client/src/components/common/InlineField.tsx index 285191ff871..0a31f198651 100644 --- a/packages/desktop-client/src/components/common/InlineField.tsx +++ b/packages/desktop-client/src/components/common/InlineField.tsx @@ -8,7 +8,7 @@ type InlineFieldProps = { label: ReactNode; labelWidth?: number; children?: ReactNode; - width: number; + width: number | string; style?: CSSProperties; }; diff --git a/packages/desktop-client/src/components/modals/BudgetSummary.js b/packages/desktop-client/src/components/modals/BudgetSummary.tsx similarity index 86% rename from packages/desktop-client/src/components/modals/BudgetSummary.js rename to packages/desktop-client/src/components/modals/BudgetSummary.tsx index d4f3a82cba6..34aa66fe137 100644 --- a/packages/desktop-client/src/components/modals/BudgetSummary.js +++ b/packages/desktop-client/src/components/modals/BudgetSummary.tsx @@ -1,9 +1,10 @@ import React from 'react'; import { rolloverBudget } from 'loot-core/src/client/queries'; -import * as monthUtils from 'loot-core/src/shared/months'; +import { format, sheetForMonth, prevMonth } from 'loot-core/src/shared/months'; import { theme, styles } from '../../style'; +import { type CommonModalProps } from '../../types/modals'; import Button from '../common/Button'; import Modal from '../common/Modal'; import Text from '../common/Text'; @@ -35,13 +36,18 @@ function ToBudget({ toBudget }) { ); } -function BudgetSummary({ month, modalProps }) { - const prevMonthName = monthUtils.format(monthUtils.prevMonth(month), 'MMM'); +type BudgetSummaryProps = { + modalProps: CommonModalProps; + month: string; +}; + +function BudgetSummary({ month, modalProps }: BudgetSummaryProps) { + const prevMonthName = format(prevMonth(month), 'MMM'); return ( - + {() => ( - + !isNaN(parseFloat(balance)); return ( - + {() => (