Skip to content

Commit 7a21889

Browse files
committed
fix: styles
1 parent 70beee2 commit 7a21889

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

packages/compass-indexes/src/components/regular-indexes-table/in-progress-index-actions.tsx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
ItemActionGroup,
55
SpinLoader,
66
Body,
7+
css,
78
} from '@mongodb-js/compass-components';
89
import type { InProgressIndex } from '../../modules/regular-indexes';
910

@@ -13,6 +14,13 @@ type Index = {
1314
buildProgress: number;
1415
};
1516

17+
const styles = css({
18+
display: 'flex',
19+
alignItems: 'center',
20+
justifyContent: 'flex-end',
21+
gap: '8px',
22+
});
23+
1624
type IndexActionsProps = {
1725
index: Index;
1826
onDeleteFailedIndexClick: (name: string) => void;
@@ -52,14 +60,7 @@ const IndexActions: React.FunctionComponent<IndexActionsProps> = ({
5260
const isBuilding = progress > 0 && progress < 100;
5361

5462
return (
55-
<div
56-
style={{
57-
display: 'flex',
58-
alignItems: 'center',
59-
justifyContent: 'flex-end',
60-
gap: '8px',
61-
}}
62-
>
63+
<div className={styles}>
6364
{isBuilding && (
6465
<>
6566
<Body>Building... {progress | 0}%</Body>

packages/compass-indexes/src/components/regular-indexes-table/regular-index-actions.tsx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ const styles = css({
1414
justifyContent: 'flex-end',
1515
});
1616

17+
const buildProgressStyles = css({
18+
display: 'flex',
19+
alignItems: 'center',
20+
justifyContent: 'flex-end',
21+
gap: '8px',
22+
});
23+
1724
type IndexActionsProps = {
1825
index: RegularIndex;
1926
serverVersion: string;
@@ -100,15 +107,7 @@ const IndexActions: React.FunctionComponent<IndexActionsProps> = ({
100107
const buildProgress = index.buildProgress;
101108
if (buildProgress > 0 && buildProgress < 1) {
102109
return (
103-
<div
104-
style={{
105-
display: 'flex',
106-
alignItems: 'center',
107-
justifyContent: 'flex-end',
108-
gap: '8px',
109-
}}
110-
data-testid="index-building-spinner"
111-
>
110+
<div className={buildProgressStyles} data-testid="index-building-spinner">
112111
<Body>Building... {(buildProgress * 100) | 0}%</Body>
113112
<SpinLoader size={16} title="Index build in progress" />
114113
<ItemActionGroup<IndexAction>

0 commit comments

Comments
 (0)