mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-27 12:51:26 +08:00
- Added new components including CodeEditor, CollapsibleSearchBar, and DraggableList. - Removed obsolete components such as Button, CustomCollapse, and StatusTag. - Updated migration status documentation and adjusted component exports. - Enhanced package.json dependencies for better compatibility.
24 lines
636 B
TypeScript
24 lines
636 B
TypeScript
// Original path: src/renderer/src/components/Preview/ImageToolButton.tsx
|
|
import { memo } from 'react'
|
|
|
|
import { Button } from '../../primitives/button'
|
|
import { Tooltip } from '../../primitives/tooltip'
|
|
|
|
interface ImageToolButtonProps {
|
|
tooltip: string
|
|
icon: React.ReactNode
|
|
onPress: () => void
|
|
}
|
|
|
|
const ImageToolButton = ({ tooltip, icon, onPress }: ImageToolButtonProps) => {
|
|
return (
|
|
<Tooltip content={tooltip} delay={500} closeDelay={0}>
|
|
<Button size="icon" className="rounded-full" onClick={onPress} aria-label={tooltip}>
|
|
{icon}
|
|
</Button>
|
|
</Tooltip>
|
|
)
|
|
}
|
|
|
|
export default memo(ImageToolButton)
|