mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-18 06:07:48 +00:00
refactor: version 2.0 (React)
This commit is contained in:
parent
7dad7d810a
commit
950f72d4e8
356 changed files with 7901 additions and 29547 deletions
30
packages/renderer/src/components/IconButton.tsx
Normal file
30
packages/renderer/src/components/IconButton.tsx
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
import { ReactNode } from 'react'
|
||||
|
||||
const IconButton = ({
|
||||
children,
|
||||
onClick,
|
||||
disabled,
|
||||
className,
|
||||
}: {
|
||||
children: ReactNode
|
||||
onClick: () => void
|
||||
disabled?: boolean | undefined
|
||||
className?: string
|
||||
}) => {
|
||||
return (
|
||||
<button
|
||||
onClick={onClick}
|
||||
className={classNames(
|
||||
className,
|
||||
'relative transform cursor-default p-2 transition duration-200',
|
||||
!disabled &&
|
||||
'btn-pressed-animation btn-hover-animation after:bg-black/[.06]',
|
||||
disabled && 'opacity-30'
|
||||
)}
|
||||
>
|
||||
{children}
|
||||
</button>
|
||||
)
|
||||
}
|
||||
|
||||
export default IconButton
|
||||
Loading…
Add table
Add a link
Reference in a new issue