From 78e6bd7959d8f8045705e723f3dc0e8d6ae75af4 Mon Sep 17 00:00:00 2001 From: arvinxx Date: Fri, 20 Oct 2023 20:15:00 +0800 Subject: [PATCH] :art: refactor: clear code and md --- package.json | 9 -- src/ActionIcon/index.tsx | 4 +- src/ActionIconGroup/index.tsx | 2 +- src/Avatar/demos/Emoji.tsx | 5 - src/Avatar/demos/index.tsx | 38 ------ src/Avatar/index.md | 18 --- src/ChatInputArea/Desktop.tsx | 2 +- src/ChatInputArea/demos/index.tsx | 11 +- src/ChatItem/components/Avatar.tsx | 2 +- src/ChatList/HistoryDivider.tsx | 2 +- src/ConfigProvider/index.tsx | 30 ----- src/CopyButton/demos/index.tsx | 5 - src/CopyButton/index.md | 14 --- src/EditableMessage/index.md | 2 +- src/EditableMessageList/index.md | 2 +- src/EditableText/demos/index.tsx | 5 - src/EditableText/index.md | 14 --- src/EditableText/index.tsx | 50 -------- src/Emoji/index.tsx | 32 ++++++ src/{FluentEmoji => Emoji}/style.ts | 0 src/EmptyCard/demos/WithCover.tsx | 13 --- src/EmptyCard/demos/index.tsx | 5 - src/EmptyCard/index.md | 17 --- src/EmptyCard/index.tsx | 64 ----------- src/EmptyCard/style.ts | 31 ----- src/FluentEmoji/demos/index.tsx | 41 ------- src/FluentEmoji/index.md | 14 --- src/FluentEmoji/index.tsx | 93 --------------- src/Form/demos/Data.tsx | 103 ----------------- src/Form/demos/index.tsx | 90 --------------- src/Form/index.md | 18 --- src/Highlighter/FullFeatured.tsx | 2 +- src/Highlighter/index.md | 2 +- src/Highlighter/index.tsx | 6 +- src/Icon/demos/CustomSize.tsx | 30 ----- src/Icon/demos/index.tsx | 27 ----- src/Icon/icons/DiscordIcon.tsx | 15 --- src/Icon/icons/index.ts | 1 - src/Icon/index.md | 20 ---- src/Input/demos/TextArea.tsx | 22 ---- src/Input/demos/index.tsx | 22 ---- src/Input/index.md | 20 ---- src/Markdown/index.md | 2 +- src/MessageInput/index.md | 2 +- src/MessageInput/index.tsx | 2 +- src/MessageModal/index.md | 2 +- src/SearchBar/demos/index.tsx | 25 ---- src/SearchBar/index.md | 16 --- src/SearchBar/index.tsx | 108 ------------------ src/SearchBar/style.ts | 30 ----- src/SliderWithInput/demos/index.tsx | 5 - src/SliderWithInput/index.md | 13 --- src/Snippet/index.md | 2 +- src/Snippet/index.tsx | 4 +- src/Spotlight/demos/index.tsx | 25 ---- src/Spotlight/index.md | 16 --- src/Tag/demos/index.tsx | 5 - src/Tag/index.md | 13 --- src/TokenTag/index.tsx | 4 +- src/Tooltip/demos/index.tsx | 10 -- src/Tooltip/index.md | 14 --- src/Tooltip/index.tsx | 14 --- src/Tooltip/style.ts | 28 ----- src/{ => components}/Avatar/index.tsx | 4 +- src/{ => components}/Avatar/style.ts | 0 src/components/ControlInput.tsx | 2 +- src/{ => components}/CopyButton/index.tsx | 2 +- .../Form/components/FormDivider.tsx | 0 .../Form/components/FormFooter.tsx | 0 .../Form/components/FormGroup.tsx | 2 +- .../Form/components/FormItem.tsx | 0 .../Form/components/FormTitle.tsx | 2 +- src/{ => components}/Form/components/style.ts | 0 src/{ => components}/Form/index.tsx | 0 src/{ => components}/Form/style.ts | 0 src/{ => components}/Input/index.tsx | 0 src/{ => components}/Input/style.ts | 0 .../SliderWithInput/index.tsx | 0 src/{ => components}/Spotlight/index.tsx | 0 src/{ => components}/Spotlight/style.ts | 0 src/{ => components}/Tag/index.tsx | 0 src/index.ts | 22 +--- src/utils/genCdnUrl.ts | 23 ---- src/utils/getEmojiByCharacter.ts | 11 +- tsconfig.json | 3 +- 85 files changed, 69 insertions(+), 1245 deletions(-) delete mode 100644 src/Avatar/demos/Emoji.tsx delete mode 100644 src/Avatar/demos/index.tsx delete mode 100644 src/Avatar/index.md delete mode 100644 src/ConfigProvider/index.tsx delete mode 100644 src/CopyButton/demos/index.tsx delete mode 100644 src/CopyButton/index.md delete mode 100644 src/EditableText/demos/index.tsx delete mode 100644 src/EditableText/index.md delete mode 100644 src/EditableText/index.tsx create mode 100644 src/Emoji/index.tsx rename src/{FluentEmoji => Emoji}/style.ts (100%) delete mode 100644 src/EmptyCard/demos/WithCover.tsx delete mode 100644 src/EmptyCard/demos/index.tsx delete mode 100644 src/EmptyCard/index.md delete mode 100644 src/EmptyCard/index.tsx delete mode 100644 src/EmptyCard/style.ts delete mode 100644 src/FluentEmoji/demos/index.tsx delete mode 100644 src/FluentEmoji/index.md delete mode 100644 src/FluentEmoji/index.tsx delete mode 100644 src/Form/demos/Data.tsx delete mode 100644 src/Form/demos/index.tsx delete mode 100644 src/Form/index.md delete mode 100644 src/Icon/demos/CustomSize.tsx delete mode 100644 src/Icon/demos/index.tsx delete mode 100644 src/Icon/icons/DiscordIcon.tsx delete mode 100644 src/Icon/icons/index.ts delete mode 100644 src/Icon/index.md delete mode 100644 src/Input/demos/TextArea.tsx delete mode 100644 src/Input/demos/index.tsx delete mode 100644 src/Input/index.md delete mode 100644 src/SearchBar/demos/index.tsx delete mode 100644 src/SearchBar/index.md delete mode 100644 src/SearchBar/index.tsx delete mode 100644 src/SearchBar/style.ts delete mode 100644 src/SliderWithInput/demos/index.tsx delete mode 100644 src/SliderWithInput/index.md delete mode 100644 src/Spotlight/demos/index.tsx delete mode 100644 src/Spotlight/index.md delete mode 100644 src/Tag/demos/index.tsx delete mode 100644 src/Tag/index.md delete mode 100644 src/Tooltip/demos/index.tsx delete mode 100644 src/Tooltip/index.md delete mode 100644 src/Tooltip/index.tsx delete mode 100644 src/Tooltip/style.ts rename src/{ => components}/Avatar/index.tsx (93%) rename src/{ => components}/Avatar/style.ts (100%) rename src/{ => components}/CopyButton/index.tsx (96%) rename src/{ => components}/Form/components/FormDivider.tsx (100%) rename src/{ => components}/Form/components/FormFooter.tsx (100%) rename src/{ => components}/Form/components/FormGroup.tsx (96%) rename src/{ => components}/Form/components/FormItem.tsx (100%) rename src/{ => components}/Form/components/FormTitle.tsx (96%) rename src/{ => components}/Form/components/style.ts (100%) rename src/{ => components}/Form/index.tsx (100%) rename src/{ => components}/Form/style.ts (100%) rename src/{ => components}/Input/index.tsx (100%) rename src/{ => components}/Input/style.ts (100%) rename src/{ => components}/SliderWithInput/index.tsx (100%) rename src/{ => components}/Spotlight/index.tsx (100%) rename src/{ => components}/Spotlight/style.ts (100%) rename src/{ => components}/Tag/index.tsx (100%) delete mode 100644 src/utils/genCdnUrl.ts diff --git a/package.json b/package.json index b2ba616f..94894169 100644 --- a/package.json +++ b/package.json @@ -62,13 +62,7 @@ "@ant-design/icons": "^5", "@babel/runtime": "^7", "@floating-ui/react": "^0", - "@giscus/react": "^2", "@lobehub/chat-plugin-sdk": "latest", - "@lobehub/emojilib": "latest", - "@react-spring/three": "^9", - "@react-spring/web": "^9", - "@react-three/drei": "^9", - "@react-three/fiber": "^8", "ahooks": "^3", "antd": "^5", "chroma-js": "^2", @@ -81,19 +75,16 @@ "lucide-react": "^0.288.0", "polished": "^4", "prism-react-renderer": "^2", - "rc-footer": "^0", "re-resizable": "^6", "react-error-boundary": "^4", "react-layout-kit": "^1.7.1", "react-markdown": "^8", "react-rnd": "^10", - "react-simple-code-editor": "^0", "rehype-katex": "^6", "remark-gfm": "^3", "remark-math": "^5", "shikiji": "^0", "swr": "^2", - "three": "^0.150", "ts-md5": "^1", "url-join": "^5", "use-merge-value": "^1", diff --git a/src/ActionIcon/index.tsx b/src/ActionIcon/index.tsx index 8897c313..109e56e1 100644 --- a/src/ActionIcon/index.tsx +++ b/src/ActionIcon/index.tsx @@ -2,9 +2,9 @@ import { Loader2 } from 'lucide-react'; import { forwardRef, useMemo } from 'react'; import Icon, { type IconProps } from '@/Icon'; -import Spotlight from '@/Spotlight'; -import Tooltip, { type TooltipProps } from '@/Tooltip'; +import Spotlight from '@/components/Spotlight'; import { DivProps } from '@/types'; +import { Tooltip, type TooltipProps } from 'antd'; import { useStyles } from './style'; diff --git a/src/ActionIconGroup/index.tsx b/src/ActionIconGroup/index.tsx index cbe56965..c8ae7949 100644 --- a/src/ActionIconGroup/index.tsx +++ b/src/ActionIconGroup/index.tsx @@ -1,6 +1,6 @@ import ActionIcon, { ActionIconProps } from '@/ActionIcon'; import Icon from '@/Icon'; -import Spotlight from '@/Spotlight'; +import Spotlight from '@/components/Spotlight'; import { Dropdown } from 'antd'; import { MoreHorizontal, type LucideIcon } from 'lucide-react'; diff --git a/src/Avatar/demos/Emoji.tsx b/src/Avatar/demos/Emoji.tsx deleted file mode 100644 index 53212c20..00000000 --- a/src/Avatar/demos/Emoji.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import { Avatar } from '@ant-design/pro-chat'; - -export default () => { - return ; -}; diff --git a/src/Avatar/demos/index.tsx b/src/Avatar/demos/index.tsx deleted file mode 100644 index 8782a7c9..00000000 --- a/src/Avatar/demos/index.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import { ActionIconProps, Avatar } from '@ant-design/pro-chat'; -import { StoryBook, useControls, useCreateStore } from '@lobehub/ui'; - -import { useCdnFn } from '@/ConfigProvider'; - -export default () => { - const genCdnUrl = useCdnFn(); - const store = useCreateStore(); - const control: ActionIconProps | any = useControls( - { - animation: false, - avatar: genCdnUrl({ - path: 'assets/logo-3d.webp', - pkg: '@lobehub/assets-logo', - version: '1.1.0', - }), - background: '#FEE064', - shape: { - options: ['circle', 'square'], - value: 'circle', - }, - size: { - max: 128, - min: 16, - step: 1, - value: 40, - }, - title: 'cm', - }, - { store }, - ); - - return ( - - - - ); -}; diff --git a/src/Avatar/index.md b/src/Avatar/index.md deleted file mode 100644 index b585e883..00000000 --- a/src/Avatar/index.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -nav: Components -group: Data Display -title: Avatar -description: Avatar is a component that displays a user's profile picture or initials. It can be customized with props like size, shape, background color, and image source. If no image source is provided, it will display the user's initials. This component is typically used in user profile pages, comment sections, or messaging applications. ---- - -## Default - - - -## Emoji - - - -## APIs - - diff --git a/src/ChatInputArea/Desktop.tsx b/src/ChatInputArea/Desktop.tsx index 71da441d..75d43b09 100644 --- a/src/ChatInputArea/Desktop.tsx +++ b/src/ChatInputArea/Desktop.tsx @@ -4,7 +4,7 @@ import { CSSProperties, forwardRef, useCallback, useRef } from 'react'; import useControlledState from 'use-merge-value'; import Icon from '@/Icon'; -import { TextArea, type TextAreaProps } from '@/Input'; +import { TextArea, type TextAreaProps } from '@/components/Input'; import Action from './Action'; import { useStyles } from './style'; diff --git a/src/ChatInputArea/demos/index.tsx b/src/ChatInputArea/demos/index.tsx index 7b11d9e8..df34889d 100644 --- a/src/ChatInputArea/demos/index.tsx +++ b/src/ChatInputArea/demos/index.tsx @@ -1,6 +1,8 @@ -import { ActionIcon, ChatInputArea, DraggablePanel, Icon, TokenTag } from '@ant-design/pro-chat'; -import { Button } from 'antd'; -import { Archive, Eraser, Languages } from 'lucide-react'; +/** + * compact: true + */ +import { ActionIcon, ChatInputArea, DraggablePanel, TokenTag } from '@ant-design/pro-chat'; +import { Eraser, Languages } from 'lucide-react'; import { useState } from 'react'; import { Flexbox } from 'react-layout-kit'; @@ -10,7 +12,7 @@ export default () => { return (
- + @@ -20,7 +22,6 @@ export default () => { } expand={expand} - footer={ -
- - ); -}; diff --git a/src/FluentEmoji/index.md b/src/FluentEmoji/index.md deleted file mode 100644 index 528b3f85..00000000 --- a/src/FluentEmoji/index.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -nav: Components -group: Data Display -title: FluentEmoji -description: The FluentEmoji component is used to display an emoji with the Fluent design style. It supports different types of styles (modern, flat, high-contrast) and sizes. It also provides a loading spinner when the image is being fetched from the server, and a fallback text emoji when the image fails to load. The component is customizable with className and style props, and can receive additional props to be passed down to the underlying div element. ---- - -## Default - - - -## APIs - - diff --git a/src/FluentEmoji/index.tsx b/src/FluentEmoji/index.tsx deleted file mode 100644 index 63d47777..00000000 --- a/src/FluentEmoji/index.tsx +++ /dev/null @@ -1,93 +0,0 @@ -import { kebabCase } from 'lodash-es'; -import { memo, useMemo, useState } from 'react'; - -import { useCdnFn } from '@/ConfigProvider'; -import Img from '@/Img'; -import { DivProps } from '@/types'; -import { getEmojiNameByCharacter } from '@/utils/getEmojiByCharacter'; - -import { useStyles } from './style'; - -export interface FluentEmojiProps extends DivProps { - /** - * @description The emoji character to be rendered - */ - emoji: string; - /** - * @description Size of the emoji - * @default 40 - */ - size?: number; - /** - * @description The type of the FluentUI emoji set to be used - * @default '3d' - */ - type?: 'modern' | 'flat' | 'high-contrast' | 'anim' | '3d' | 'pure'; -} - -const FluentEmoji = memo( - ({ emoji, className, style, type = '3d', size = 40 }) => { - const genCdnUrl = useCdnFn(); - const [loadingFail, setLoadingFail] = useState(false); - - const { cx, styles } = useStyles(); - - const emojiUrl = useMemo(() => { - if (type === 'pure') return; - const emojiName = getEmojiNameByCharacter(emoji); - if (!emojiName) return; - switch (type) { - case 'modern': - case 'flat': - case 'high-contrast': { - return genCdnUrl({ - path: `icons/${type}/${kebabCase(emojiName)}.svg`, - pkg: 'fluentui-emoji', - version: '0.0.8', - }); - } - case 'anim': { - return genCdnUrl({ - path: `assets/${emojiName}.webp`, - pkg: '@lobehub/assets-emoji-anim', - version: '1.0.0', - }); - } - case '3d': { - return genCdnUrl({ - path: `assets/${emojiName}.webp`, - pkg: '@lobehub/assets-emoji', - version: '1.3.0', - }); - } - } - }, [type, emoji]); - - if (type === 'pure' || !emojiUrl || loadingFail) - return ( -
- {emoji} -
- ); - - return ( -
- {emoji} setLoadingFail(true)} - src={emojiUrl} - width={size} - /> -
- ); - }, -); - -export default FluentEmoji; diff --git a/src/Form/demos/Data.tsx b/src/Form/demos/Data.tsx deleted file mode 100644 index 357cf58e..00000000 --- a/src/Form/demos/Data.tsx +++ /dev/null @@ -1,103 +0,0 @@ -import { Form, type FormProps } from '@ant-design/pro-chat'; -import { Button, InputNumber, Segmented, Select, Switch } from 'antd'; -import { Palette, PanelLeftClose } from 'lucide-react'; - -const setting = { - i18n: 'en', - liteAnimation: false, - sidebarExpand: true, - sidebarFixedMode: 'float', - sidebarWidth: 300, -}; - -const items: FormProps['items'] = [ - { - children: [ - { - children: ( - - - - - - - - - - - - - - - - - - - - - - - ); -}; diff --git a/src/Form/index.md b/src/Form/index.md deleted file mode 100644 index fd738642..00000000 --- a/src/Form/index.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -nav: Components -group: Data Entry -title: Form -description: High performance Form component with data scope management. Including data collection, verification, and styles. ---- - -## Default - - - -## DataDrive - - - -## APIs - - diff --git a/src/Highlighter/FullFeatured.tsx b/src/Highlighter/FullFeatured.tsx index ab5cfa7f..07fd026b 100644 --- a/src/Highlighter/FullFeatured.tsx +++ b/src/Highlighter/FullFeatured.tsx @@ -4,7 +4,7 @@ import { memo, useState } from 'react'; import { Flexbox } from 'react-layout-kit'; import ActionIcon from '@/ActionIcon'; -import CopyButton from '@/CopyButton'; +import CopyButton from '@/components/CopyButton'; import { languageMap } from '@/hooks/useHighlight'; import { DivProps } from '@/types'; diff --git a/src/Highlighter/index.md b/src/Highlighter/index.md index 6e4daede..5e6ad259 100644 --- a/src/Highlighter/index.md +++ b/src/Highlighter/index.md @@ -1,6 +1,6 @@ --- nav: Components -group: Data Display +group: Content title: Highlighter description: The Highlighter component is used to display syntax-highlighted code blocks. It takes in the code content as a string and the language of the code as a string. The component allows users to copy the code content and can also display the language tag. The code block can have a background and the theme can be set to either 'dark' or 'light'. --- diff --git a/src/Highlighter/index.tsx b/src/Highlighter/index.tsx index 79f8f07e..d620747f 100644 --- a/src/Highlighter/index.tsx +++ b/src/Highlighter/index.tsx @@ -1,8 +1,8 @@ import { memo } from 'react'; -import CopyButton, { type CopyButtonProps } from '@/CopyButton'; -import Spotlight from '@/Spotlight'; -import Tag from '@/Tag'; +import CopyButton, { type CopyButtonProps } from '@/components/CopyButton'; +import Spotlight from '@/components/Spotlight'; +import Tag from '@/components/Tag'; import { DivProps } from '@/types'; import FullFeatured from './FullFeatured'; diff --git a/src/Icon/demos/CustomSize.tsx b/src/Icon/demos/CustomSize.tsx deleted file mode 100644 index 95f32f3b..00000000 --- a/src/Icon/demos/CustomSize.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import { Icon, IconProps } from '@ant-design/pro-chat'; -import { StoryBook, useControls, useCreateStore } from '@lobehub/ui'; -import { Settings } from 'lucide-react'; - -export default () => { - const store = useCreateStore(); - const size: IconProps['size'] | any = useControls( - { - fontSize: { - max: 100, - min: 8, - step: 4, - value: 28, - }, - strokeWidth: { - max: 2, - min: 1, - step: 0.5, - value: 2, - }, - }, - { store }, - ); - - return ( - - - - ); -}; diff --git a/src/Icon/demos/index.tsx b/src/Icon/demos/index.tsx deleted file mode 100644 index b2e0eff1..00000000 --- a/src/Icon/demos/index.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import { Icon, IconProps } from '@ant-design/pro-chat'; -import { StoryBook, useControls, useCreateStore } from '@lobehub/ui'; -import * as LucideIcon from 'lucide-react'; - -export default () => { - const store = useCreateStore(); - const control: IconProps | any = useControls( - { - icon: { - options: LucideIcon, - value: LucideIcon.Settings, - }, - size: { - options: ['large', 'normal', 'small'], - value: 'large', - }, - spin: false, - }, - { store }, - ); - - return ( - - - - ); -}; diff --git a/src/Icon/icons/DiscordIcon.tsx b/src/Icon/icons/DiscordIcon.tsx deleted file mode 100644 index ad406bfa..00000000 --- a/src/Icon/icons/DiscordIcon.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import { createLucideIcon, type LucideIcon } from 'lucide-react'; - -const Discord: LucideIcon = createLucideIcon('Discord', [ - [ - 'path', - { - d: 'M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z', - key: '18tl5t', - }, - ], -]); - -const DiscordIcon = (props: LucideIcon) => ; - -export default DiscordIcon as LucideIcon; diff --git a/src/Icon/icons/index.ts b/src/Icon/icons/index.ts deleted file mode 100644 index e0abe621..00000000 --- a/src/Icon/icons/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { default as DiscordIcon } from './DiscordIcon'; diff --git a/src/Icon/index.md b/src/Icon/index.md deleted file mode 100644 index b574dcdb..00000000 --- a/src/Icon/index.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -nav: Components -group: General -title: Icon -description: Icons are graphical symbols used to represent a concept or an action. The `Icon` component is a reusable React component that renders an SVG icon from the `lucide-react` library. ---- - -## Default - -Search icons in [`Lucide Icon`](https://lucide.dev/) - - - -## CustomSize - - - -## APIs - - diff --git a/src/Input/demos/TextArea.tsx b/src/Input/demos/TextArea.tsx deleted file mode 100644 index 6b5c6313..00000000 --- a/src/Input/demos/TextArea.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import { TextArea, TextAreaProps } from '@ant-design/pro-chat'; -import { StoryBook, useControls, useCreateStore } from '@lobehub/ui'; - -export default () => { - const store = useCreateStore(); - const controls: TextAreaProps | any = useControls( - { - placeholder: 'Type keywords...', - type: { - options: ['ghost', 'block', 'pure'], - value: 'ghost', - }, - }, - { store }, - ); - - return ( - -