cherry-studio/packages/ui/src/components/composites/ImageToolButton/index.tsx
MyPrototypeWhat b9a947d2fd refactor: restructure UI components and remove deprecated files
- 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.
2025-10-28 14:27:05 +08:00

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)