geido commented on code in PR #31858:
URL: https://github.com/apache/superset/pull/31858#discussion_r1917007327


##########
superset-frontend/src/components/ErrorMessage/ErrorAlert.tsx:
##########
@@ -16,250 +16,128 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import { useState, ReactNode } from 'react';
-import {
-  ErrorLevel,
-  ErrorSource,
-  styled,
-  useTheme,
-  t,
-} from '@superset-ui/core';
-import { noOp } from 'src/utils/common';
-import Modal from 'src/components/Modal';
-import Button from 'src/components/Button';
-import { isCurrentUserBot } from 'src/utils/isBot';
-
-import Icons from 'src/components/Icons';
-import CopyToClipboard from '../CopyToClipboard';
-
-const ErrorAlertDiv = styled.div<{ level: ErrorLevel }>`
-  align-items: center;
-  background-color: ${({ level, theme }) => theme.colors[level].light2};
-  border-radius: ${({ theme }) => theme.borderRadius}px;
-  border: 1px solid ${({ level, theme }) => theme.colors[level].base};
-  color: ${({ level, theme }) => theme.colors[level].dark2};
-  padding: ${({ theme }) => 2 * theme.gridUnit}px;
-  width: 100%;
-
-  .top-row {
-    display: flex;
-    justify-content: space-between;
-  }
-
-  .error-body {
-    padding-top: ${({ theme }) => theme.gridUnit}px;
-    padding-left: ${({ theme }) => 8 * theme.gridUnit}px;
-  }
-
-  .icon {
-    margin-right: ${({ theme }) => 2 * theme.gridUnit}px;
-  }
-
-  .link {
-    color: ${({ level, theme }) => theme.colors[level].dark2};
-    text-decoration: underline;
-    &:focus-visible {
-      border: 1px solid ${({ theme }) => theme.colors.primary.base};
-      padding: ${({ theme }) => theme.gridUnit / 2}px;
-      margin: -${({ theme }) => theme.gridUnit / 2 + 1}px;
-      border-radius: ${({ theme }) => theme.borderRadius}px;
-  }
-`;
-
-const ErrorModal = styled(Modal)<{ level: ErrorLevel }>`
-  color: ${({ level, theme }) => theme.colors[level].dark2};
-  overflow-wrap: break-word;
-
-  .antd5-modal-header {
-    background-color: ${({ level, theme }) => theme.colors[level].light2};
-    padding: ${({ theme }) => 4 * theme.gridUnit}px;
-  }
-
-  .icon {
-    margin-right: ${({ theme }) => 2 * theme.gridUnit}px;
-  }
-
-  .header {
-    display: flex;
-    align-items: center;
-    font-size: ${({ theme }) => theme.typography.sizes.l}px;
-  }
-`;
-
-const LeftSideContent = styled.div`
-  align-items: center;
-  display: flex;
-`;
-
-interface ErrorAlertProps {
-  body: ReactNode;
-  copyText?: string;
-  level: ErrorLevel;
-  source?: ErrorSource;
-  subtitle: ReactNode;
-  title: ReactNode;
-  description?: string;
+import { useState } from 'react';
+import { Modal, Tooltip } from 'antd';

Review Comment:
   Why importing from `antd` directly? From one side this is the previous 
version of `antd` and on the other hand, I think we said to import components 
from our wrappers not from `antd` directly.



-- 
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.

To unsubscribe, e-mail: [email protected]

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