@ant-design/icons#WarningTwoTone TypeScript Examples

The following examples show how to use @ant-design/icons#WarningTwoTone. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: StatusIcon.tsx    From datart with Apache License 2.0 6 votes vote down vote up
ErrorIcon: React.FC<{
  errInfo?: Record<WidgetErrorType, string>;
}> = memo(({ errInfo }) => {
  if (!errInfo) return null;
  const errorInfos = Object.values(errInfo);
  if (!errorInfos.length) return null;
  const errHtml = (
    <div style={{ maxHeight: '200px', maxWidth: '400px', overflow: 'auto' }}>
      {errorInfos.map((item, i) => {
        return <p key={i}>{String(item)}</p>;
      })}
    </div>
  );
  return (
    <Tooltip title={errHtml}>
      <StyledErrorIcon
        icon={<WarningTwoTone twoToneColor={ERROR} />}
        type="link"
      />
    </Tooltip>
  );
})