Skip to content

Commit

Permalink
loaders
Browse files Browse the repository at this point in the history
  • Loading branch information
paula-stacho committed Oct 28, 2024
1 parent 2a41cfe commit d6cf33e
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
Radio,
RadioGroup,
spacing,
SpinLoader,
Subtitle,
TextInput,
} from '@mongodb-js/compass-components';
Expand Down Expand Up @@ -305,6 +306,7 @@ export function CreateShardKeyForm({
}
variant="primary"
isLoading={isSubmittingForSharding}
loadingIndicator={<SpinLoader />}
>
Shard Collection
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
Label,
Button,
ButtonVariant,
SpinLoader,
} from '@mongodb-js/compass-components';
import { connect } from 'react-redux';
import {
Expand Down Expand Up @@ -167,6 +168,7 @@ export function ShardKeyCorrect({
onClick={onUnmanageNamespace}
variant={ButtonVariant.Primary}
isLoading={isUnmanagingNamespace}
loadingIndicator={<SpinLoader />}
>
Unmanage collection
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
spacing,
css,
ButtonVariant,
SpinLoader,
} from '@mongodb-js/compass-components';
import React from 'react';
import ShardKeyMarkup from '../shard-key-markup';
Expand Down Expand Up @@ -69,6 +70,7 @@ export function ShardKeyMismatch({
onClick={onUnmanageNamespace}
variant={ButtonVariant.Default}
isLoading={isUnmanagingNamespace}
loadingIndicator={<SpinLoader />}
className={unmanageBtnStyles}
>
Unmanage collection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
Button,
css,
spacing,
SpinLoader,
} from '@mongodb-js/compass-components';
import { connect } from 'react-redux';
import {
Expand All @@ -23,6 +24,7 @@ const btnStyles = css({
const errorStyles = css({
marginTop: spacing[200],
whiteSpace: 'pre-wrap',
textAlign: 'left',
});

interface ShardingErrorProps {
Expand All @@ -49,6 +51,7 @@ export function ShardingError({
data-testid="cancel-sharding-btn"
disabled={isCancellingSharding || isSubmittingForSharding}
isLoading={isCancellingSharding}
loadingIndicator={<SpinLoader />}
onClick={onCancelSharding}
>
Cancel Request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
css,
Link,
spacing,
SpinLoader,
} from '@mongodb-js/compass-components';
import { connect } from 'react-redux';
import {
Expand Down Expand Up @@ -42,6 +43,7 @@ export function ShardingState({
data-testid="cancel-sharding-btn"
onClick={onCancelSharding}
isLoading={isCancellingSharding}
loadingIndicator={<SpinLoader />}
>
Cancel Request
</Button>
Expand Down

0 comments on commit d6cf33e

Please sign in to comment.