GeneralSettings: Use Box instead of gf-form classes (#75678)

DashboardSettings: Use Box instead of gf-form classes
This commit is contained in:
Joao Silva 2023-09-29 09:35:33 +01:00 committed by GitHub
parent bbadbeb2be
commit 79c0087466
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,6 +13,7 @@ import {
HorizontalGroup, HorizontalGroup,
TextArea, TextArea,
} from '@grafana/ui'; } from '@grafana/ui';
import { Box } from '@grafana/ui/src/unstable';
import { Page } from 'app/core/components/Page/Page'; import { Page } from 'app/core/components/Page/Page';
import { FolderPicker } from 'app/core/components/Select/FolderPicker'; import { FolderPicker } from 'app/core/components/Select/FolderPicker';
import { updateTimeZoneDashboard, updateWeekStartDashboard } from 'app/features/dashboard/state/actions'; import { updateTimeZoneDashboard, updateWeekStartDashboard } from 'app/features/dashboard/state/actions';
@ -119,7 +120,7 @@ export function GeneralSettingsUnconnected({
return ( return (
<Page navModel={sectionNav} pageNav={pageNav}> <Page navModel={sectionNav} pageNav={pageNav}>
<div style={{ maxWidth: '600px' }}> <div style={{ maxWidth: '600px' }}>
<div className="gf-form-group"> <Box marginBottom={5}>
<Field <Field
label={ label={
<HorizontalGroup justify="space-between"> <HorizontalGroup justify="space-between">
@ -177,7 +178,7 @@ export function GeneralSettingsUnconnected({
> >
<RadioButtonGroup value={dashboard.editable} options={editableOptions} onChange={onEditableChange} /> <RadioButtonGroup value={dashboard.editable} options={editableOptions} onChange={onEditableChange} />
</Field> </Field>
</div> </Box>
<TimePickerSettings <TimePickerSettings
onTimeZoneChange={onTimeZoneChange} onTimeZoneChange={onTimeZoneChange}
@ -208,9 +209,7 @@ export function GeneralSettingsUnconnected({
</Field> </Field>
</CollapsableSection> </CollapsableSection>
<div className="gf-form-button-row"> <Box marginTop={3}>{dashboard.meta.canDelete && <DeleteDashboardButton dashboard={dashboard} />}</Box>
{dashboard.meta.canDelete && <DeleteDashboardButton dashboard={dashboard} />}
</div>
</div> </div>
</Page> </Page>
); );