refactor: move all Icon import source to tailchat-design

pull/56/head
moonrailgun 3 years ago
parent 097386703d
commit ddf040dc0a

@ -2,7 +2,7 @@ import React, { PropsWithChildren, useRef, useState } from 'react';
import { closeModal, openModal } from './Modal';
import { showToasts, t } from 'tailchat-shared';
import { Avatar } from 'antd';
import { Icon } from '@/components/Icon';
import { Icon } from 'tailchat-design';
import { ModalAvatarCropper } from './modals/AvatarCropper';
import { isGIF } from '@/utils/file-helper';

@ -1,5 +1,5 @@
import { blobUrlToFile } from '@/utils/file-helper';
import { Icon } from '@/components/Icon';
import { Icon } from 'tailchat-design';
import clsx from 'clsx';
import React, { PropsWithChildren, useState } from 'react';
import { uploadFile, UploadFileResult, useAsyncRequest } from 'tailchat-shared';

@ -3,7 +3,7 @@ import {
getMessageTextDecorators,
pluginChatInputActions,
} from '@/plugin/common';
import { Icon } from '@/components/Icon';
import { Icon } from 'tailchat-design';
import { Dropdown, Menu } from 'antd';
import React from 'react';
import { t } from 'tailchat-shared';

@ -1,4 +1,4 @@
import { Icon } from '@/components/Icon';
import { Icon } from 'tailchat-design';
import { Menu } from 'antd';
import React, { useCallback } from 'react';
import {

@ -1,5 +1,5 @@
import { messageInterpreter } from '@/plugin/common';
import { Icon } from '@/components/Icon';
import { Icon } from 'tailchat-design';
import { Popover } from 'antd';
import React from 'react';
import { useMemo } from 'react';

@ -3,7 +3,7 @@ import { t, useChatBoxContext, useSharedEventHandler } from 'tailchat-shared';
import _isNil from 'lodash/isNil';
import { getMessageRender } from '@/plugin/common';
import { UserName } from '../UserName';
import { Icon } from '@/components/Icon';
import { Icon } from 'tailchat-design';
export const ChatReply: React.FC = React.memo(() => {
const { replyMsg, setReplyMsg, clearReplyMsg } = useChatBoxContext();

@ -1,4 +1,4 @@
import { Icon } from '@/components/Icon';
import { Icon } from 'tailchat-design';
import React, { PropsWithChildren } from 'react';
import { useReducer } from 'react';

@ -1,6 +0,0 @@
export {
/**
* @deprecated please import it from `tailchat-design`
*/
Icon,
} from 'tailchat-design';

@ -1,4 +1,4 @@
import { Icon } from '@/components/Icon';
import { Icon } from 'tailchat-design';
import { t } from 'tailchat-shared';
import React from 'react';

@ -12,7 +12,7 @@ import _isString from 'lodash/isString';
import _noop from 'lodash/noop';
import { PortalAdd, PortalRemove } from './Portal';
import { Button, Typography } from 'antd';
import { Icon } from '@/components/Icon';
import { Icon } from 'tailchat-design';
import { CSSTransition } from 'react-transition-group';
import clsx from 'clsx';
import { useIsMobile } from '@/hooks/useIsMobile';

@ -1,4 +1,4 @@
import { Icon } from '@/components/Icon';
import { Icon } from 'tailchat-design';
import { openReconfirmModalP } from '@/components/Modal';
import { GroupUserPopover } from '@/components/popover/GroupUserPopover';
import { UserListItem } from '@/components/UserListItem';

@ -1,4 +1,4 @@
import { Icon } from '@/components/Icon';
import { Icon } from 'tailchat-design';
import React from 'react';
export const Spinner: React.FC = React.memo(() => {

@ -1,5 +1,5 @@
import { Icon } from './Icon';
import React from 'react';
import { Icon } from 'tailchat-design';
import { DelayTip } from './DelayTip';
export const TipIcon: React.FC<{

@ -1,4 +1,4 @@
import { Icon } from '@/components/Icon';
import { Icon } from 'tailchat-design';
import React from 'react';
import { useGroupInfo, t } from 'tailchat-shared';
import { ModalWrapper } from '../../Modal';

@ -2,7 +2,7 @@ import { Typography } from 'antd';
import React from 'react';
import { version } from 'tailchat-shared';
import logoUrl from '@assets/images/logo.svg';
import { Icon } from '@/components/Icon';
import { Icon } from 'tailchat-design';
const { Paragraph, Text, Link } = Typography;

@ -13,10 +13,9 @@ export {
notification,
Empty,
} from 'antd';
export { Avatar, SensitiveText } from 'tailchat-design';
export { Avatar, SensitiveText, Icon } from 'tailchat-design';
export const TextArea = Input.TextArea;
export { Image } from '@/components/Image';
export { Icon } from '@/components/Icon';
export { IconBtn } from '@/components/IconBtn';
export { PillTabs, PillTabPane } from '@/components/PillTabs';
export { LoadingSpinner } from '@/components/LoadingSpinner';

@ -1,4 +1,4 @@
import { Icon } from '@/components/Icon';
import { Icon } from 'tailchat-design';
import {
forgetPassword,
resetPassword,

@ -2,7 +2,7 @@ import { Spinner } from '@/components/Spinner';
import { useSearchParam } from '@/hooks/useSearchParam';
import { setUserJWT } from '@/utils/jwt-helper';
import { setGlobalUserLoginInfo } from '@/utils/user-helper';
import { Icon } from '@/components/Icon';
import { Icon } from 'tailchat-design';
import React, { useState } from 'react';
import { useNavigate } from 'react-router';
import {

@ -1,4 +1,4 @@
import { Icon } from '@/components/Icon';
import { Icon } from 'tailchat-design';
import { Divider } from 'antd';
import { isValidStr, loginWithEmail, t, useAsyncFn } from 'tailchat-shared';
import React, { useEffect, useState } from 'react';

@ -2,7 +2,7 @@ import { isValidStr, registerWithEmail, t, useAsyncFn } from 'tailchat-shared';
import React, { useState } from 'react';
import { Spinner } from '../../components/Spinner';
import { string } from 'yup';
import { Icon } from '@/components/Icon';
import { Icon } from 'tailchat-design';
import { useNavigate } from 'react-router';
import { setUserJWT } from '../../utils/jwt-helper';
import { setGlobalUserLoginInfo } from '../../utils/user-helper';

@ -1,5 +1,5 @@
import { useIsMobile } from '@/hooks/useIsMobile';
import { Icon } from '@/components/Icon';
import { Icon } from 'tailchat-design';
import React, { useCallback } from 'react';
import { useSidebarContext } from '../SidebarContext';

@ -1,6 +1,6 @@
import { closeModal, openModal } from '@/components/Modal';
import { SettingsView } from '@/components/modals/SettingsView';
import { Icon } from '@/components/Icon';
import { Icon } from 'tailchat-design';
import React, { useCallback } from 'react';
export const SettingBtn: React.FC = React.memo(() => {

Loading…
Cancel
Save