* 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,66 @@
|
||||
.fm-button {
|
||||
border-radius: 0px;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
cursor: pointer;
|
||||
transition: opacity 0.3s;
|
||||
}
|
||||
|
||||
.fm-button-primary {
|
||||
background-color: rgb(237, 129, 49);
|
||||
color: white;
|
||||
|
||||
&:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
}
|
||||
|
||||
.fm-button-secondary {
|
||||
background-color: rgb(255, 255, 255);
|
||||
color: rgb(55, 65, 81);
|
||||
border: 1px solid rgb(209, 213, 219);
|
||||
|
||||
&:hover {
|
||||
background-color: #e0e0e0;
|
||||
}
|
||||
}
|
||||
|
||||
.fm-button-danger {
|
||||
background-color: #dc2626;
|
||||
color: white;
|
||||
border: 1px solid #dc2626;
|
||||
|
||||
&:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
}
|
||||
|
||||
.fm-button-small {
|
||||
font-size: 10px;
|
||||
padding: 2px 3px;
|
||||
}
|
||||
|
||||
.fm-button-medium {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.fm-button-disabled {
|
||||
background-color: rgb(156, 163, 175);
|
||||
border: 1px solid rgb(156, 163, 175);
|
||||
|
||||
&:hover {
|
||||
opacity: 1;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
|
||||
.fm-button-icon {
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
align-items: center;
|
||||
}
|
||||
@@ -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