Skip to content

Commit

Permalink
Merge pull request #18 from dayuy/beta
Browse files Browse the repository at this point in the history
fix: export ChatItem & EditableMessage
  • Loading branch information
Carrotzpc authored Aug 2, 2024
2 parents b2b989a + eb0586f commit 239f0e6
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/ChatItem/components/MessageContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useResponsive } from 'antd-style';
import { type ReactNode, memo } from 'react';
import { Flexbox } from 'react-layout-kit';

import EditableMessage from '@/EditableMessage';
import { EditableMessage } from '@/EditableMessage';

import { useStyles } from '../style';
import { ChatItemProps } from '../type';
Expand Down
2 changes: 1 addition & 1 deletion src/ChatItem/demos/Alert.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Highlighter, StoryBook, useControls, useCreateStore } from '@lobehub/ui';
import { ChatItem, ChatItemProps } from '@yuntijs/ui';

import ChatItem, { ChatItemProps } from '..';
import { avatar } from './data';

const demoError = {
Expand Down
2 changes: 1 addition & 1 deletion src/ChatItem/demos/Tmarkdown.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ActionIconGroup, StoryBook, useControls, useCreateStore } from '@lobehub/ui';
import { ChatItem, ChatItemProps } from '@yuntijs/ui';
import { useState } from 'react';

import ChatItem, { ChatItemProps } from '..';
import { content } from '../../EditableMessage/demos/data';
import { avatar, dropdownMenu, items } from './data';

Expand Down
2 changes: 1 addition & 1 deletion src/ChatItem/demos/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ActionIconGroup, StoryBook, useControls, useCreateStore } from '@lobehub/ui';
import { ChatItem, ChatItemProps } from '@yuntijs/ui';
import { useState } from 'react';

import ChatItem, { ChatItemProps } from '..';
import { avatar, dropdownMenu, items } from './data';

export default () => {
Expand Down
4 changes: 1 addition & 3 deletions src/ChatItem/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { ChatItemProps } from './type';

const MOBILE_AVATAR_SIZE = 32;

const ChatItem = memo<ChatItemProps>(
export const ChatItem = memo<ChatItemProps>(
({
avatarAddon,
onAvatarClick,
Expand Down Expand Up @@ -118,6 +118,4 @@ const ChatItem = memo<ChatItemProps>(
}
);

export default ChatItem;

export type { ChatItemProps } from './type';
2 changes: 1 addition & 1 deletion src/EditableMessage/demos/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { StoryBook, useControls, useCreateStore } from '@lobehub/ui';
import { EditableMessage } from '@yuntijs/ui';
import { button } from 'leva';
import { useState } from 'react';

import EditableMessage from '..';
import { content } from './data';

export default () => {
Expand Down
4 changes: 1 addition & 3 deletions src/EditableMessage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export interface EditableMessageProps {
markdownProps?: MarkdownProps;
}

const EditableMessage = memo<EditableMessageProps>(
export const EditableMessage = memo<EditableMessageProps>(
({
value,
onChange,
Expand Down Expand Up @@ -180,5 +180,3 @@ const EditableMessage = memo<EditableMessageProps>(
);
}
);

export default EditableMessage;

0 comments on commit 239f0e6

Please sign in to comment.