re added floating action (#500)

This commit is contained in:
Erik Jan de Wit 2021-04-06 19:19:15 +02:00 committed by GitHub
parent e75deb3305
commit a27045c617
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 5 deletions

View file

@ -240,7 +240,12 @@ export const ClientSettings = ({ save, reset }: ClientSettingsProps) => {
}
/>
</FormGroup>
<SaveReset name="settings" save={save} reset={reset} />
<SaveReset
className="keycloak__form_actions"
name="settings"
save={save}
reset={reset}
/>
</FormAccess>
</ScrollForm>
</>

View file

@ -1,17 +1,17 @@
import React from "react";
import { useTranslation } from "react-i18next";
import { ActionGroup, Button } from "@patternfly/react-core";
import { ActionGroup, ActionGroupProps, Button } from "@patternfly/react-core";
type SaveResetProps = {
type SaveResetProps = ActionGroupProps & {
name: string;
save: () => void;
reset: () => void;
};
export const SaveReset = ({ name, save, reset }: SaveResetProps) => {
export const SaveReset = ({ name, save, reset, ...rest }: SaveResetProps) => {
const { t } = useTranslation();
return (
<ActionGroup>
<ActionGroup {...rest}>
<Button data-testid={name + "Save"} variant="tertiary" onClick={save}>
{t("common:save")}
</Button>