etr2460 commented on a change in pull request #10105:
URL: 
https://github.com/apache/incubator-superset/pull/10105#discussion_r442932615



##########
File path: superset-frontend/src/SqlLab/components/TableElement.jsx
##########
@@ -207,7 +207,7 @@ class TableElement extends React.PureComponent {
         </div>
         <div className="pull-right">
           {table.isMetadataLoading || table.isExtraMetadataLoading ? (
-            <Loading size={50} position="normal" className="margin-zero" />

Review comment:
       do you think we should keep the size around in the `Loading` component 
for now, but remove the places that manually set it to `50` since that's the 
default already? I could see a use case for multiple sizes of loading 
indicators, so it seems reasonable to keep

##########
File path: superset-frontend/src/components/Loading.tsx
##########
@@ -41,21 +33,26 @@ const FLOATING_STYLE = {
   transform: 'translate(-50%, -50%)',
 };
 
-export default function Loading({ size, position, className }) {
+const LoaderImg = styled.img`
+  z-index: 1000;
+  &.margin-zero {
+    margin: 0px;
+  }
+`;
+export default function Loading({
+  position = 'floating',
+  className = '',
+}: Props) {
   const style = position === 'floating' ? FLOATING_STYLE : {};
   const styleWithWidth = {

Review comment:
       if you don't decide to keep the `size` prop though, this is unnecessary, 
you can simply set style on the `LoaderImg` to `style`




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to