Deprecate FormButton to use AccessibleButton everywhere

This commit is contained in:
Germain Souquet 2021-06-21 14:16:37 +01:00
parent ca123d3c4d
commit adb42b7927
11 changed files with 31 additions and 112 deletions

View file

@ -15,8 +15,8 @@ limitations under the License.
*/
import React, {ReactNode} from "react";
import AccessibleButton from "../elements/AccessibleButton";
import FormButton from "../elements/FormButton";
import {XOR} from "../../../@types/common";
export interface IProps {
@ -50,8 +50,12 @@ const GenericToast: React.FC<XOR<IPropsExtended, IProps>> = ({
{detailContent}
</div>
<div className="mx_Toast_buttons" aria-live="off">
{onReject && rejectLabel && <FormButton label={rejectLabel} kind="danger" onClick={onReject} /> }
<FormButton label={acceptLabel} onClick={onAccept} />
{onReject && rejectLabel && <AccessibleButton kind="danger" onClick={onReject}>
{rejectLabel}
</AccessibleButton> }
<AccessibleButton onClick={onAccept} kind="primary">
{acceptLabel}
</AccessibleButton>
</div>
</div>;
};