Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

Add spacing above buttons in new collection modal (#72927)

Andrei Chernykh0c06a10ff50b
diff --git a/frontend/src/metabase/collections/components/CreateCollectionForm/CreateCollectionForm.tsx b/frontend/src/metabase/collections/components/CreateCollectionForm/CreateCollectionForm.tsx
index 0e83d4424f5..07cb9a41e71 100644
--- a/frontend/src/metabase/collections/components/CreateCollectionForm/CreateCollectionForm.tsx
+++ b/frontend/src/metabase/collections/components/CreateCollectionForm/CreateCollectionForm.tsx
@@ -20,6 +20,7 @@ import { Collections } from "metabase/entities/collections";
import { Form, FormProvider } from "metabase/forms";
import { PLUGIN_TENANTS } from "metabase/plugins";
import type { State } from "metabase/redux/store";
+import { Flex } from "metabase/ui";
import * as Errors from "metabase/utils/errors";
import { connect } from "metabase/utils/redux";
import type { Collection } from "metabase-types/api";
@@ -142,6 +143,7 @@ function CreateCollectionForm({
filterPersonalCollections={filterPersonalCollections}
entityType="collection"
onCollectionSelect={setSelectedParentCollection}
+ mb="1rem"
/>
)}
{showAuthorityLevelPicker && !isParentTenantCollection && (
@@ -149,10 +151,12 @@ function CreateCollectionForm({
)}
<FormFooter>
<FormErrorMessage inline />
- {!!onCancel && (
- <Button type="button" onClick={onCancel}>{t`Cancel`}</Button>
- )}
- <FormSubmitButton title={t`Create`} disabled={!dirty} primary />
+ <Flex style={{ flexShrink: 1 }} justify="flex-end" gap="sm">
+ {!!onCancel && (
+ <Button type="button" onClick={onCancel}>{t`Cancel`}</Button>
+ )}
+ <FormSubmitButton title={t`Create`} disabled={!dirty} primary />
+ </Flex>
</FormFooter>
</Form>
);