You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-14 19:02:33 +03:00
Correct the GenericToast props to show the two modes of operation
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@@ -17,17 +17,21 @@ limitations under the License.
|
||||
import React, {ReactChild} from "react";
|
||||
|
||||
import FormButton from "../elements/FormButton";
|
||||
import {XOR} from "../../../@types/common";
|
||||
|
||||
interface IProps {
|
||||
description: ReactChild;
|
||||
acceptLabel: string;
|
||||
rejectLabel?: string;
|
||||
|
||||
onAccept();
|
||||
onReject?();
|
||||
}
|
||||
|
||||
const GenericToast: React.FC<IProps> = ({description, acceptLabel, rejectLabel, onAccept, onReject}) => {
|
||||
interface IPropsExtended extends IProps {
|
||||
rejectLabel: string;
|
||||
onReject();
|
||||
}
|
||||
|
||||
const GenericToast: React.FC<XOR<IPropsExtended, IProps>> = ({description, acceptLabel, rejectLabel, onAccept, onReject}) => {
|
||||
return <div>
|
||||
<div className="mx_Toast_description">
|
||||
{ description }
|
||||
|
||||
Reference in New Issue
Block a user