File tree Expand file tree Collapse file tree 5 files changed +25
-29
lines changed
packages/compass-global-writes/src/components Expand file tree Collapse file tree 5 files changed +25
-29
lines changed Original file line number Diff line number Diff line change @@ -17,3 +17,8 @@ export const containerStyles = css({
1717 marginBottom : spacing [ 400 ] ,
1818 textAlign : 'justify' ,
1919} ) ;
20+
21+ export const bannerBtnStyles = css ( {
22+ float : 'right' ,
23+ height : `${ spacing [ 600 ] } px` ,
24+ } ) ;
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import {
2020import { connect } from 'react-redux' ;
2121import ExampleCommandsMarkup from '../example-commands-markup' ;
2222import { ShardZonesTable } from '../shard-zones-table' ;
23+ import { bannerBtnStyles } from '../common-styles' ;
2324
2425const containerStyles = css ( {
2526 display : 'flex' ,
@@ -28,10 +29,6 @@ const containerStyles = css({
2829 marginBottom : spacing [ 400 ] ,
2930} ) ;
3031
31- const manageBtnStyles = css ( {
32- marginTop : spacing [ 100 ] ,
33- } ) ;
34-
3532export interface IncompleteShardingSetupProps {
3633 shardKey : ShardKey ;
3734 shardZones : ShardZoneData [ ] ;
@@ -70,7 +67,7 @@ export function IncompleteShardingSetup({
7067 variant = { ButtonVariant . Default }
7168 isLoading = { isSubmittingForSharding }
7269 loadingIndicator = { < SpinLoader /> }
73- className = { manageBtnStyles }
70+ className = { bannerBtnStyles }
7471 >
7572 Enable Global Writes
7673 </ Button >
Original file line number Diff line number Diff line change 22 Banner ,
33 BannerVariant ,
44 Button ,
5- spacing ,
6- css ,
75 ButtonVariant ,
86 SpinLoader ,
97} from '@mongodb-js/compass-components' ;
@@ -17,11 +15,11 @@ import {
1715} from '../../store/reducer' ;
1816import { connect } from 'react-redux' ;
1917import type { ManagedNamespace } from '../../services/atlas-global-writes-service' ;
20- import { containerStyles , bannerStyles } from '../common-styles' ;
21-
22- const unmanageBtnStyles = css ( {
23- marginTop : spacing [ 100 ] ,
24- } ) ;
18+ import {
19+ containerStyles ,
20+ bannerStyles ,
21+ bannerBtnStyles ,
22+ } from '../common-styles' ;
2523
2624const getRequestedShardKey = (
2725 managedNamespace : ManagedNamespace
@@ -71,7 +69,7 @@ export function ShardKeyMismatch({
7169 variant = { ButtonVariant . Default }
7270 isLoading = { isUnmanagingNamespace }
7371 loadingIndicator = { < SpinLoader /> }
74- className = { unmanageBtnStyles }
72+ className = { bannerBtnStyles }
7573 >
7674 Unmanage collection
7775 </ Button >
Original file line number Diff line number Diff line change @@ -14,12 +14,11 @@ import {
1414 ShardingStatuses ,
1515} from '../../store/reducer' ;
1616import CreateShardKeyForm from '../create-shard-key-form' ;
17- import { containerStyles , bannerStyles } from '../common-styles' ;
18-
19- const btnStyles = css ( {
20- float : 'right' ,
21- height : spacing [ 600 ] ,
22- } ) ;
17+ import {
18+ containerStyles ,
19+ bannerStyles ,
20+ bannerBtnStyles ,
21+ } from '../common-styles' ;
2322
2423const errorStyles = css ( {
2524 marginTop : spacing [ 200 ] ,
@@ -47,7 +46,7 @@ export function ShardingError({
4746 make any necessary changes to your collection, and try again.
4847 < div className = { errorStyles } > { shardingError } </ div >
4948 < Button
50- className = { btnStyles }
49+ className = { bannerBtnStyles }
5150 data-testid = "cancel-sharding-btn"
5251 disabled = { isCancellingSharding || isSubmittingForSharding }
5352 isLoading = { isCancellingSharding }
Original file line number Diff line number Diff line change 44 BannerVariant ,
55 Body ,
66 Button ,
7- css ,
87 Link ,
9- spacing ,
108 SpinLoader ,
119} from '@mongodb-js/compass-components' ;
1210import { connect } from 'react-redux' ;
@@ -15,15 +13,14 @@ import {
1513 type RootState ,
1614 ShardingStatuses ,
1715} from '../../store/reducer' ;
18- import { containerStyles , bannerStyles } from '../common-styles' ;
16+ import {
17+ containerStyles ,
18+ bannerStyles ,
19+ bannerBtnStyles ,
20+ } from '../common-styles' ;
1921
2022const nbsp = '\u00a0' ;
2123
22- const btnStyles = css ( {
23- float : 'right' ,
24- height : spacing [ 600 ] ,
25- } ) ;
26-
2724interface ShardingStateProps {
2825 isCancellingSharding : boolean ;
2926 onCancelSharding : ( ) => void ;
@@ -39,7 +36,7 @@ export function ShardingState({
3936 < strong > Sharding your collection …</ strong >
4037 { nbsp } this should not take too long.
4138 < Button
42- className = { btnStyles }
39+ className = { bannerBtnStyles }
4340 data-testid = "cancel-sharding-btn"
4441 onClick = { onCancelSharding }
4542 isLoading = { isCancellingSharding }
You can’t perform that action at this time.
0 commit comments