* 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>
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
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>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user