diff --git a/packages/compass-global-writes/src/components/common-styles.ts b/packages/compass-global-writes/src/components/common-styles.ts
index b9ec0bd7e84..a73a688af02 100644
--- a/packages/compass-global-writes/src/components/common-styles.ts
+++ b/packages/compass-global-writes/src/components/common-styles.ts
@@ -17,3 +17,8 @@ export const containerStyles = css({
marginBottom: spacing[400],
textAlign: 'justify',
});
+
+export const bannerBtnStyles = css({
+ float: 'right',
+ height: `${spacing[600]}px`,
+});
diff --git a/packages/compass-global-writes/src/components/states/incomplete-sharding-setup.tsx b/packages/compass-global-writes/src/components/states/incomplete-sharding-setup.tsx
index 8f5b4e0ba4c..3ead0059e21 100644
--- a/packages/compass-global-writes/src/components/states/incomplete-sharding-setup.tsx
+++ b/packages/compass-global-writes/src/components/states/incomplete-sharding-setup.tsx
@@ -20,6 +20,7 @@ import {
import { connect } from 'react-redux';
import ExampleCommandsMarkup from '../example-commands-markup';
import { ShardZonesTable } from '../shard-zones-table';
+import { bannerBtnStyles } from '../common-styles';
const containerStyles = css({
display: 'flex',
@@ -28,10 +29,6 @@ const containerStyles = css({
marginBottom: spacing[400],
});
-const manageBtnStyles = css({
- marginTop: spacing[100],
-});
-
export interface IncompleteShardingSetupProps {
shardKey: ShardKey;
shardZones: ShardZoneData[];
@@ -70,7 +67,7 @@ export function IncompleteShardingSetup({
variant={ButtonVariant.Default}
isLoading={isSubmittingForSharding}
loadingIndicator={}
- className={manageBtnStyles}
+ className={bannerBtnStyles}
>
Enable Global Writes
diff --git a/packages/compass-global-writes/src/components/states/shard-key-mismatch.tsx b/packages/compass-global-writes/src/components/states/shard-key-mismatch.tsx
index 33d3b87be2d..bad54b20256 100644
--- a/packages/compass-global-writes/src/components/states/shard-key-mismatch.tsx
+++ b/packages/compass-global-writes/src/components/states/shard-key-mismatch.tsx
@@ -2,8 +2,6 @@ import {
Banner,
BannerVariant,
Button,
- spacing,
- css,
ButtonVariant,
SpinLoader,
} from '@mongodb-js/compass-components';
@@ -17,11 +15,11 @@ import {
} from '../../store/reducer';
import { connect } from 'react-redux';
import type { ManagedNamespace } from '../../services/atlas-global-writes-service';
-import { containerStyles, bannerStyles } from '../common-styles';
-
-const unmanageBtnStyles = css({
- marginTop: spacing[100],
-});
+import {
+ containerStyles,
+ bannerStyles,
+ bannerBtnStyles,
+} from '../common-styles';
const getRequestedShardKey = (
managedNamespace: ManagedNamespace
@@ -71,7 +69,7 @@ export function ShardKeyMismatch({
variant={ButtonVariant.Default}
isLoading={isUnmanagingNamespace}
loadingIndicator={}
- className={unmanageBtnStyles}
+ className={bannerBtnStyles}
>
Unmanage collection
diff --git a/packages/compass-global-writes/src/components/states/sharding-error.tsx b/packages/compass-global-writes/src/components/states/sharding-error.tsx
index a71c2d583b6..7988299616e 100644
--- a/packages/compass-global-writes/src/components/states/sharding-error.tsx
+++ b/packages/compass-global-writes/src/components/states/sharding-error.tsx
@@ -14,12 +14,11 @@ import {
ShardingStatuses,
} from '../../store/reducer';
import CreateShardKeyForm from '../create-shard-key-form';
-import { containerStyles, bannerStyles } from '../common-styles';
-
-const btnStyles = css({
- float: 'right',
- height: spacing[600],
-});
+import {
+ containerStyles,
+ bannerStyles,
+ bannerBtnStyles,
+} from '../common-styles';
const errorStyles = css({
marginTop: spacing[200],
@@ -47,7 +46,7 @@ export function ShardingError({
make any necessary changes to your collection, and try again.
{shardingError}