Skip to content

armgit / fider

Public Imported from GitHub
0

Open platform to collect and prioritize feedback

React upgrade is a little more picky about types.

Matt Roberts7812810a0477
diff --git a/public/components/ErrorBoundary.tsx b/public/components/ErrorBoundary.tsx
index 7418da426..2a888755e 100644
--- a/public/components/ErrorBoundary.tsx
+++ b/public/components/ErrorBoundary.tsx
@@ -3,6 +3,7 @@ import { ErrorPage } from "@fider/pages/Error/Error.page"
import { FiderContext } from "@fider/services"
interface ErrorBoundaryProps {
+ children?: React.ReactNode
onError?: (err: Error) => void
}
diff --git a/public/components/SignInModal.tsx b/public/components/SignInModal.tsx
index 095a11d0f..eda3506d5 100644
--- a/public/components/SignInModal.tsx
+++ b/public/components/SignInModal.tsx
@@ -8,7 +8,7 @@ interface SignInModalProps {
onClose: () => void
}
-export const SignInModal: React.StatelessComponent<SignInModalProps> = (props) => {
+export const SignInModal: React.FC<SignInModalProps> = (props) => {
const [email, setEmail] = useState("")
useEffect(() => {
diff --git a/public/components/common/Button.tsx b/public/components/common/Button.tsx
index 3bc6423b0..dc2796d43 100644
--- a/public/components/common/Button.tsx
+++ b/public/components/common/Button.tsx
@@ -4,6 +4,7 @@ import React, { useEffect, useRef, useState } from "react"
import { classSet } from "@fider/services"
interface ButtonProps {
+ children?: React.ReactNode
className?: string
disabled?: boolean
href?: string
diff --git a/public/components/common/Hint.tsx b/public/components/common/Hint.tsx
index 2ff25717c..34ec72108 100644
--- a/public/components/common/Hint.tsx
+++ b/public/components/common/Hint.tsx
@@ -7,6 +7,7 @@ import { cache } from "@fider/services"
import { Icon } from "./Icon"
interface HintProps {
+ children?: React.ReactNode
permanentCloseKey?: string
condition?: boolean
}
diff --git a/public/components/common/Message.tsx b/public/components/common/Message.tsx
index 1bfda9151..5da42a70e 100644
--- a/public/components/common/Message.tsx
+++ b/public/components/common/Message.tsx
@@ -9,6 +9,7 @@ import { HStack } from "@fider/components/layout"
import { Icon } from "./Icon"
interface MessageProps {
+ children?: React.ReactNode
type: "success" | "warning" | "error"
className?: string
alignment?: "center"
diff --git a/public/components/common/Modal.tsx b/public/components/common/Modal.tsx
index 77e63b434..e0f90b8a6 100644
--- a/public/components/common/Modal.tsx
+++ b/public/components/common/Modal.tsx
@@ -5,6 +5,7 @@ import ReactDOM from "react-dom"
import { classSet } from "@fider/services"
interface ModalWindowProps {
+ children?: React.ReactNode
className?: string
isOpen: boolean
size?: "small" | "large" | "fluid"
diff --git a/public/components/common/form/Checkbox.tsx b/public/components/common/form/Checkbox.tsx
index 2beb68e03..02db803b6 100644
--- a/public/components/common/form/Checkbox.tsx
+++ b/public/components/common/form/Checkbox.tsx
@@ -6,6 +6,7 @@ import { HStack } from "@fider/components/layout"
import "./Checkbox.scss"
interface CheckboxProps {
+ children?: React.ReactNode
field: string
checked?: boolean
onChange?: (checked: boolean) => void
diff --git a/public/components/common/form/Field.tsx b/public/components/common/form/Field.tsx
index 805f14023..cd05bbf34 100644
--- a/public/components/common/form/Field.tsx
+++ b/public/components/common/form/Field.tsx
@@ -4,6 +4,7 @@ import { ValidationContext } from "./Form"
import { DisplayError, hasError } from "./DisplayError"
interface FieldProps {
+ children?: React.ReactNode
className?: string
label?: string
field?: string
diff --git a/public/components/common/form/Form.tsx b/public/components/common/form/Form.tsx
index c751c97d2..775ac3d8a 100644
--- a/public/components/common/form/Form.tsx
+++ b/public/components/common/form/Form.tsx
@@ -9,6 +9,7 @@ interface ValidationContext {
}
interface FormProps {
+ children?: React.ReactNode
className?: string
error?: Failure
}
diff --git a/public/components/common/form/ImageUploader.tsx b/public/components/common/form/ImageUploader.tsx
index fb038e9c7..bc58c62e9 100644
--- a/public/components/common/form/ImageUploader.tsx
+++ b/public/components/common/form/ImageUploader.tsx
@@ -11,6 +11,7 @@ import IconPhotograph from "@fider/assets/images/heroicons-photograph.svg"
const hardFileSizeLimit = 5 * 1024 * 1024
interface ImageUploaderProps {
+ children?: React.ReactNode
instanceID?: string
field: string
label?: string
diff --git a/public/components/common/form/Input.tsx b/public/components/common/form/Input.tsx
index 81e0fdd93..d8eb7c51a 100644
--- a/public/components/common/form/Input.tsx
+++ b/public/components/common/form/Input.tsx
@@ -8,6 +8,7 @@ import "./Input.scss"
import { HStack } from "@fider/components/layout"
interface InputProps {
+ children?: React.ReactNode
field: string
label?: string
className?: string
diff --git a/public/components/common/form/Select.tsx b/public/components/common/form/Select.tsx
index e864e68bc..6a6f6c43c 100644
--- a/public/components/common/form/Select.tsx
+++ b/public/components/common/form/Select.tsx
@@ -11,6 +11,7 @@ export interface SelectOption {
}
interface SelectProps {
+ children?: React.ReactNode
field: string
label?: string
maxLength?: number
diff --git a/public/components/common/form/TextArea.tsx b/public/components/common/form/TextArea.tsx
index 4c6df2525..0a61360da 100644
--- a/public/components/common/form/TextArea.tsx
+++ b/public/components/common/form/TextArea.tsx
@@ -7,6 +7,7 @@ import Textarea from "react-textarea-autosize"
import "./TextArea.scss"
interface TextAreaProps {
+ children?: React.ReactNode
label?: string
field: string
value?: string