From ae7c3b332b2b82734614cbf653c069b105a7bee7 Mon Sep 17 00:00:00 2001 From: canisminor1990 Date: Sat, 16 Dec 2023 15:17:54 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20style:=20Update=20player=20downl?= =?UTF-8?q?oad=20style?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/react/AudioPlayer/index.tsx | 50 +++++++++++++++------------------ 1 file changed, 23 insertions(+), 27 deletions(-) diff --git a/src/react/AudioPlayer/index.tsx b/src/react/AudioPlayer/index.tsx index b1c0920..99692c2 100644 --- a/src/react/AudioPlayer/index.tsx +++ b/src/react/AudioPlayer/index.tsx @@ -1,5 +1,5 @@ -import { ActionIcon, type ActionIconProps, Icon, Tag } from '@lobehub/ui'; -import { Dropdown, Slider } from 'antd'; +import { ActionIcon, type ActionIconProps, Tag } from '@lobehub/ui'; +import { Slider } from 'antd'; import { Download, PauseCircle, Play, StopCircle } from 'lucide-react'; import { type CSSProperties, memo, useCallback, useMemo } from 'react'; import { Flexbox } from 'react-layout-kit'; @@ -31,6 +31,7 @@ export interface AudioPlayerProps { onPause?: () => void; onPlay?: () => void; onStop?: () => void; + showDonload?: boolean; showSlider?: boolean; showTime?: boolean; style?: CSSProperties; @@ -60,6 +61,7 @@ const AudioPlayer = memo( stop: () => {}, }, allowPause = true, + showDonload = true, buttonActive, timeType = 'left', showSlider = true, @@ -115,7 +117,7 @@ const AudioPlayer = memo( className={className} gap={8} horizontal - style={{ paddingRight: 8, width: '100%', ...style }} + style={{ width: '100%', ...style }} >
( /> )} {showTime && ( - , - onClick: download, - }, - ], - }} - placement="top" - > - - + + )} + {!isLoading && showDonload && ( + )} );