🐛 fix: improve editing width issue (#264)

* 🐛 fix: improve editing padding issue

* 🐛 fix: update docs
This commit is contained in:
Arvin Xu
2025-02-15 11:44:29 +08:00
committed by GitHub
parent fcb80ed508
commit b1b4e5bdca
3 changed files with 15 additions and 2 deletions
+13
View File
@@ -0,0 +1,13 @@
import { ChatItem } from '@lobehub/ui/chat';
import { avatar } from './data';
const data = {
loading: false,
message:
"要使用 dayjs 的 fromNow 函数,需要先安装 dayjs 库并在代码中引入它。然后,可以使用以下语法来获取当前时间与给定时间之间的相对时间:\n\n```javascript\ndayjs().fromNow();\ndayjs('2021-05-01').fromNow();\n```",
time: 1_686_538_950_084,
};
export default () => {
return <ChatItem {...data} avatar={avatar} editing={true} />;
};
+1 -1
View File
@@ -11,7 +11,7 @@ apiHeader:
## Default
<code src="./demos/index.tsx" nopadding></code>
<code src="./demos/index.tsx" nopadding></code> <code src="./demos/Editing.tsx"></code>
## Alert
+1 -1
View File
@@ -92,7 +92,7 @@ const ChatItem = memo<ChatItemProps>(
}
gap={8}
>
<Flexbox>
<Flexbox width={'100%'}>
{error && (message === placeholderMessage || !message) ? (
<ErrorContent error={error} message={errorMessage} placement={placement} />
) : (