diff --git a/packages/grafana-ui/src/components/Forms/index.ts b/packages/grafana-ui/src/components/Forms/index.ts index 6edc4796e82..55f9b4ff077 100644 --- a/packages/grafana-ui/src/components/Forms/index.ts +++ b/packages/grafana-ui/src/components/Forms/index.ts @@ -10,6 +10,7 @@ import { Field } from './Field'; import { Button, LinkButton } from './Button'; import { Switch } from './Switch'; import { TextArea } from './TextArea/TextArea'; +import { Checkbox } from './Checkbox'; const Forms = { RadioButtonGroup, @@ -26,6 +27,7 @@ const Forms = { InputControl, AsyncSelect, TextArea, + Checkbox, }; export { ButtonVariant } from './Button'; diff --git a/public/app/features/dashboard/components/SaveDashboard/forms/SaveDashboardForm.tsx b/public/app/features/dashboard/components/SaveDashboard/forms/SaveDashboardForm.tsx index cc5d9748905..4768a8c80d7 100644 --- a/public/app/features/dashboard/components/SaveDashboard/forms/SaveDashboardForm.tsx +++ b/public/app/features/dashboard/components/SaveDashboard/forms/SaveDashboardForm.tsx @@ -1,4 +1,5 @@ import React, { useMemo } from 'react'; + import { Forms, Button, HorizontalGroup } from '@grafana/ui'; import { e2e } from '@grafana/e2e'; import { SaveDashboardFormProps } from '../types'; @@ -30,32 +31,32 @@ export const SaveDashboardForm: React.FC = ({ dashboard, > {({ register, errors }) => ( <> - +
+ {hasTimeChanged && ( + + )} + {hasVariableChanged && ( + + )} + {(hasVariableChanged || hasTimeChanged) &&
} + - - {hasTimeChanged && ( - - - - )} - {hasVariableChanged && ( - - - - )} +