From f356b3349199c0a98e9977873e8b455b2f9d02e2 Mon Sep 17 00:00:00 2001 From: Josh Krebs Date: Mon, 28 Aug 2023 10:46:45 -0700 Subject: [PATCH 1/3] refactor budget/MobileTable to tsx --- .../budget/{MobileTable.js => MobileTable.tsx} | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) rename packages/desktop-client/src/components/budget/{MobileTable.js => MobileTable.tsx} (69%) diff --git a/packages/desktop-client/src/components/budget/MobileTable.js b/packages/desktop-client/src/components/budget/MobileTable.tsx similarity index 69% rename from packages/desktop-client/src/components/budget/MobileTable.js rename to packages/desktop-client/src/components/budget/MobileTable.tsx index 2123cfe155c..ae7a0e4a1e8 100644 --- a/packages/desktop-client/src/components/budget/MobileTable.js +++ b/packages/desktop-client/src/components/budget/MobileTable.tsx @@ -1,11 +1,16 @@ -import React from 'react'; +import React, { type CSSProperties, type ReactNode } from 'react'; import { colors } from '../../style'; import View from '../common/View'; export const ROW_HEIGHT = 50; -export const ListItem = ({ children, style, ...props }) => { +type ListItemProps = { + children?: ReactNode; + style: CSSProperties; +}; + +export const ListItem = ({ children, style, ...props }: ListItemProps) => { return ( Date: Mon, 28 Aug 2023 10:50:41 -0700 Subject: [PATCH 2/3] add release notes for MobileTable refactor --- upcoming-release-notes/1602.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 upcoming-release-notes/1602.md diff --git a/upcoming-release-notes/1602.md b/upcoming-release-notes/1602.md new file mode 100644 index 00000000000..e528a3596d1 --- /dev/null +++ b/upcoming-release-notes/1602.md @@ -0,0 +1,6 @@ +--- +category: Maintenance +authors: [Jod929] +--- + +Refactor MobileTable to tsx. \ No newline at end of file From 4a1dd67906d4f1e54a723d8311f02704adc8f29e Mon Sep 17 00:00:00 2001 From: Josh Krebs Date: Mon, 28 Aug 2023 17:57:07 -0700 Subject: [PATCH 3/3] update MobileTable to iclude props spread to View --- .../desktop-client/src/components/budget/MobileTable.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/desktop-client/src/components/budget/MobileTable.tsx b/packages/desktop-client/src/components/budget/MobileTable.tsx index ae7a0e4a1e8..1bde735167a 100644 --- a/packages/desktop-client/src/components/budget/MobileTable.tsx +++ b/packages/desktop-client/src/components/budget/MobileTable.tsx @@ -1,11 +1,15 @@ -import React, { type CSSProperties, type ReactNode } from 'react'; +import React, { + type ComponentProps, + type CSSProperties, + type ReactNode, +} from 'react'; import { colors } from '../../style'; import View from '../common/View'; export const ROW_HEIGHT = 50; -type ListItemProps = { +type ListItemProps = ComponentProps & { children?: ReactNode; style: CSSProperties; };