Re-write types for modal actions.

This commit is contained in:
Paul
2021-07-06 11:34:36 +01:00
parent cf2b81c22d
commit 9390ffd00b
9 changed files with 31 additions and 38 deletions

View File

@@ -71,7 +71,7 @@ export function ModifyAccountModal({ onClose, field }: Props) {
{
confirmation: true,
onClick: handleSubmit(onSubmit),
text:
children:
field === "email" ? (
<Text id="app.special.modals.actions.send_email" />
) : (
@@ -80,7 +80,7 @@ export function ModifyAccountModal({ onClose, field }: Props) {
},
{
onClick: onClose,
text: <Text id="app.special.modals.actions.close" />,
children: <Text id="app.special.modals.actions.close" />,
},
]}>
{/* Preact / React typing incompatabilities */}

View File

@@ -28,7 +28,7 @@ export function UserPicker(props: Props) {
onClose={props.onClose}
actions={[
{
text: <Text id="app.special.modals.actions.ok" />,
children: <Text id="app.special.modals.actions.ok" />,
onClick: () => props.callback(selected).then(props.onClose),
},
]}>