0.4.0
This commit is contained in:
@@ -81,35 +81,37 @@ export const QuickReply = (props: QuickReplyProps) => {
|
||||
}}
|
||||
onMouseDown={onmousedown}
|
||||
>
|
||||
{quickReplies.map((qr, index) => (
|
||||
<Chip
|
||||
key={index}
|
||||
className={mjChatCls(
|
||||
['input-quickreply-chip', `input-quickreply-chip-${index + 1}`],
|
||||
'bg-white/15 text-default shrink-0 cursor-pointer',
|
||||
)}
|
||||
classNames={{
|
||||
base: mjChatCls([
|
||||
'input-quickreply-chip-base',
|
||||
`input-quickreply-chip-${index + 1}-base`,
|
||||
]),
|
||||
content: mjChatCls([
|
||||
'input-quickreply-chip-content',
|
||||
`input-quickreply-chip-${index + 1}-content`,
|
||||
]),
|
||||
}}
|
||||
radius="full"
|
||||
variant="light"
|
||||
onClick={() => {
|
||||
const isClick = Date.now() - lastDragTime.current > 50;
|
||||
if (isClick && qr.message) {
|
||||
onSend(qr.message);
|
||||
}
|
||||
}}
|
||||
>
|
||||
{qr.label}
|
||||
</Chip>
|
||||
))}
|
||||
{quickReplies
|
||||
.filter((qr) => !qr.isHidden)
|
||||
.map((qr, index) => (
|
||||
<Chip
|
||||
key={index}
|
||||
className={mjChatCls(
|
||||
['input-quickreply-chip', `input-quickreply-chip-${index + 1}`],
|
||||
'bg-white/15 text-default shrink-0 cursor-pointer',
|
||||
)}
|
||||
classNames={{
|
||||
base: mjChatCls([
|
||||
'input-quickreply-chip-base',
|
||||
`input-quickreply-chip-${index + 1}-base`,
|
||||
]),
|
||||
content: mjChatCls([
|
||||
'input-quickreply-chip-content',
|
||||
`input-quickreply-chip-${index + 1}-content`,
|
||||
]),
|
||||
}}
|
||||
radius="full"
|
||||
variant="light"
|
||||
onClick={() => {
|
||||
const isClick = Date.now() - lastDragTime.current > 50;
|
||||
if (isClick && qr.message) {
|
||||
onSend(qr.message);
|
||||
}
|
||||
}}
|
||||
>
|
||||
{qr.label}
|
||||
</Chip>
|
||||
))}
|
||||
</ScrollShadow>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user