diff options
author | Revanshu Paliwal <revanshu.paliwal@sonarsource.com> | 2023-08-18 13:23:09 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2023-08-22 20:03:04 +0000 |
commit | 67a3d42f2042c9dd14079611de083ca2b1aa4549 (patch) | |
tree | 1f35aff07fa173c62192991c5dfa72f66dd3185b /server/sonar-web/design-system | |
parent | 265b33682fc23b83ab8bb693f78c98478660f5be (diff) | |
download | sonarqube-67a3d42f2042c9dd14079611de083ca2b1aa4549.tar.gz sonarqube-67a3d42f2042c9dd14079611de083ca2b1aa4549.zip |
SONAR-19465 Hiding spinner when loading is not true
Diffstat (limited to 'server/sonar-web/design-system')
-rw-r--r-- | server/sonar-web/design-system/src/components/Spinner.tsx | 8 | ||||
-rw-r--r-- | server/sonar-web/design-system/src/components/modal/__tests__/__snapshots__/ModalFooter-test.tsx.snap | 8 |
2 files changed, 6 insertions, 10 deletions
diff --git a/server/sonar-web/design-system/src/components/Spinner.tsx b/server/sonar-web/design-system/src/components/Spinner.tsx index aa5db5e1415..56307583627 100644 --- a/server/sonar-web/design-system/src/components/Spinner.tsx +++ b/server/sonar-web/design-system/src/components/Spinner.tsx @@ -50,12 +50,8 @@ export function Spinner(props: React.PropsWithChildren<Props>) { return ( <> - <div className="sw-overflow-hidden"> - <StyledSpinner - aria-live="polite" - className={classNames(className, { 'a11y-hidden': !loading })} - role="status" - > + <div className={classNames('sw-overflow-hidden', { 'a11y-hidden': !loading })}> + <StyledSpinner aria-live="polite" className={className} role="status"> {loading && <span className="a11y-hidden">{ariaLabel}</span>} </StyledSpinner> </div> diff --git a/server/sonar-web/design-system/src/components/modal/__tests__/__snapshots__/ModalFooter-test.tsx.snap b/server/sonar-web/design-system/src/components/modal/__tests__/__snapshots__/ModalFooter-test.tsx.snap index 13e1e90ab13..6e5b303b58c 100644 --- a/server/sonar-web/design-system/src/components/modal/__tests__/__snapshots__/ModalFooter-test.tsx.snap +++ b/server/sonar-web/design-system/src/components/modal/__tests__/__snapshots__/ModalFooter-test.tsx.snap @@ -55,11 +55,11 @@ exports[`should render with primary and secondary buttons 1`] = ` class="emotion-0 emotion-1" > <div - class="sw-overflow-hidden" + class="sw-overflow-hidden a11y-hidden" > <div aria-live="polite" - class="a11y-hidden emotion-2 emotion-3" + class="emotion-2 emotion-3" role="status" /> </div> @@ -132,11 +132,11 @@ exports[`should render with secondary button 1`] = ` class="emotion-0 emotion-1" > <div - class="sw-overflow-hidden" + class="sw-overflow-hidden a11y-hidden" > <div aria-live="polite" - class="a11y-hidden emotion-2 emotion-3" + class="emotion-2 emotion-3" role="status" /> </div> |