UNPKG

@lobehub/ui

Version:

Lobe UI is an open-source UI component library for building AIGC web apps

1 lines 1.1 kB
{"version":3,"file":"ChatSendButton.mjs","names":["Button"],"sources":["../../../../src/mobile/ChatInputArea/components/ChatSendButton.tsx"],"sourcesContent":["'use client';\n\nimport { SendHorizontal } from 'lucide-react';\nimport { memo } from 'react';\n\nimport Button from '@/Button';\n\nimport type { ChatSendButtonProps } from '../type';\n\nconst ChatSendButton = memo<ChatSendButtonProps>(({ ref, loading, onStop, onSend, ...rest }) => {\n return (\n <Button\n icon={SendHorizontal}\n loading={loading}\n onClick={(e) => {\n e.preventDefault();\n if (loading) {\n onStop?.(e);\n } else {\n onSend?.(e);\n }\n }}\n ref={ref}\n type={'primary'}\n {...rest}\n />\n );\n});\n\nChatSendButton.displayName = 'ChatSendButton';\n\nexport default ChatSendButton;\n"],"mappings":";;;;;;;;AASA,MAAM,iBAAiB,MAA2B,EAAE,KAAK,SAAS,QAAQ,QAAQ,GAAG,WAAW;AAC9F,QACE,oBAACA;EACC,MAAM;EACG;EACT,UAAU,MAAM;AACd,KAAE,gBAAgB;AAClB,OAAI,QACF,UAAS,EAAE;OAEX,UAAS,EAAE;;EAGV;EACL,MAAM;EACN,GAAI;GACJ;EAEJ;AAEF,eAAe,cAAc;AAE7B,6BAAe"}