keycloak-scim/src/clients/advanced/SaveReset.tsx

24 lines
624 B
TypeScript
Raw Normal View History

import React from "react";
import { useTranslation } from "react-i18next";
import { ActionGroup, Button } from "@patternfly/react-core";
type SaveResetProps = {
name: string;
save: () => void;
reset: () => void;
};
export const SaveReset = ({ name, save, reset }: SaveResetProps) => {
const { t } = useTranslation();
return (
<ActionGroup>
<Button data-testid={name + "Save"} variant="tertiary" onClick={save}>
{t("common:save")}
</Button>
2021-03-12 16:30:14 +00:00
<Button data-testid={name + "Revert"} variant="link" onClick={reset}>
{t("common:revert")}
</Button>
</ActionGroup>
);
};