5bfe2a0331
* feat: add file manager module - Complete file manager implementation with UI/UX - Add drive management functionality - Add file upload/download with progress tracking - Add stamp integration and handling - Add bulk operations and context menus Co-authored-by: Roland Seres <roland.seres90@gmail.com> Co-authored-by: nidishk <nidishkrishnan45@gmail.com>
35 lines
736 B
TypeScript
35 lines
736 B
TypeScript
import { ReactElement } from 'react'
|
|
import './Button.scss'
|
|
|
|
interface ButtonProps {
|
|
label: string
|
|
onClick?: () => void
|
|
icon?: ReactElement
|
|
size?: 'small' | 'medium'
|
|
variant?: 'primary' | 'secondary' | 'danger'
|
|
disabled?: boolean
|
|
width?: number
|
|
}
|
|
|
|
export function Button({
|
|
label,
|
|
onClick,
|
|
icon,
|
|
size = 'medium',
|
|
variant = 'primary',
|
|
disabled,
|
|
width,
|
|
}: ButtonProps): ReactElement {
|
|
return (
|
|
<div
|
|
className={`fm-button fm-button-${variant} fm-button-${size}${icon ? ' fm-button-icon' : ''}${
|
|
disabled ? ' fm-button-disabled' : ''
|
|
}`}
|
|
onClick={disabled ? undefined : onClick}
|
|
style={{ width: width ? `${width}px` : undefined }}
|
|
>
|
|
{icon} {label}
|
|
</div>
|
|
)
|
|
}
|