diff --git a/superset-frontend/src/SqlLab/components/TableElement.jsx b/superset-frontend/src/SqlLab/components/TableElement.jsx index 2d11f0d14..588461167 100644 --- a/superset-frontend/src/SqlLab/components/TableElement.jsx +++ b/superset-frontend/src/SqlLab/components/TableElement.jsx @@ -207,7 +207,7 @@ class TableElement extends React.PureComponent {
- );
-}
-
-Loading.propTypes = propTypes;
-Loading.defaultProps = defaultProps;
diff --git a/superset-frontend/src/components/Loading.less b/superset-frontend/src/components/Loading.tsx
similarity index 56%
rename from superset-frontend/src/components/Loading.less
rename to superset-frontend/src/components/Loading.tsx
index 411896272..74b4e3e8d 100644
--- a/superset-frontend/src/components/Loading.less
+++ b/superset-frontend/src/components/Loading.tsx
@@ -16,6 +16,37 @@
* specific language governing permissions and limitations
* under the License.
*/
-img.loading.margin-zero {
- margin: 0px;
+import React from 'react';
+import styled from '@superset-ui/style';
+
+interface Props {
+ position?: string;
+}
+
+const LoaderImg = styled.img`
+ z-index: 1000;
+ width: 50px;
+ position: relative;
+ margin: 10px;
+ &.inline {
+ margin: 0px;
+ width: 30px;
+ }
+ &.floating {
+ padding: 0;
+ margin: 0;
+ position: absolute;
+ left: 50%;
+ top: 50%;
+ transform: translate(-50%, -50%);
+ }
+`;
+export default function Loading({ position = 'floating' }: Props) {
+ return (
+
- );
+ return {this.state.error};
} else if (this.state.data) {
diff --git a/superset-frontend/stylesheets/superset.less b/superset-frontend/stylesheets/superset.less
index b76d2d262..2eca35e63 100644
--- a/superset-frontend/stylesheets/superset.less
+++ b/superset-frontend/stylesheets/superset.less
@@ -153,12 +153,6 @@ div.navbar {
}
}
-img.loading {
- width: 40px;
- position: relative;
- margin: 10px;
-}
-
img.viz-thumb-option {
width: 100px;
border: 1px solid @gray;
@@ -527,27 +521,6 @@ tr.reactable-column-header th.reactable-header-sortable {
padding-right: 17px;
}
-.explore-chart-overlay {
- position: absolute;
- z-index: @z-index-above-dashboard-charts;
- display: flex;
- align-items: center;
- justify-content: center;
- text-align: center;
-}
-
-.refresh-overlay-btn {
- font-weight: @font-weight-bold;
- margin-right: 10px;
-}
-
-.dismiss-overlay-btn {
- font-weight: @font-weight-bold;
- background: @lightest;
- color: @brand-primary;
- border-color: @brand-primary;
-}
-
.fave-unfave-icon {
.fa-star-o,
.fa-star {