Merge branch 'develop' into inconsistance-pagination-page-size

This commit is contained in:
Ahmed Bouhuolia
2024-08-14 22:01:04 +02:00
9 changed files with 169 additions and 14 deletions

View File

@@ -1,5 +1,3 @@
.root {
padding: 20px;
border: 2px dotted #c5cbd3;
@@ -9,4 +7,14 @@
flex-direction: column;
background: #fff;
position: relative;
transition: background-color 0.3s ease, border-color 0.3s ease;
&.dropzoneAccept {
border-color: rgb(0, 82, 204);
background: rgba(0, 82, 204, 0.05);
}
&.dropzoneReject {
border-color: #AC2F33;
background: rgba(172, 47, 51, 0.05)
}
}

View File

@@ -235,7 +235,14 @@ export const Dropzone = (_props: DropzoneProps) => {
>
<Box
{...getRootProps({
className: clsx(styles.root, classNames?.root),
className: clsx(
styles.root,
{
[styles.dropzoneAccept]: isDragAccept,
[styles.dropzoneReject]: isDragReject
},
classNames?.root
),
})}
// {...getStyles('root', { focusable: true })}
{...others}
@@ -253,7 +260,7 @@ export const Dropzone = (_props: DropzoneProps) => {
<input {...getInputProps(inputProps)} name={name} />
<div
data-enable-pointer-events={enablePointerEvents || undefined}
className={classNames?.content}
className={clsx(styles.content, classNames?.content)}
>
{children}
</div>
@@ -268,8 +275,6 @@ Dropzone.Idle = DropzoneIdle;
Dropzone.Reject = DropzoneReject;
type PossibleRef<T> = Ref<T> | undefined;
export function assignRef<T>(ref: PossibleRef<T>, value: T) {

View File

@@ -120,6 +120,7 @@ export function UploadAttachmentsPopoverContent({
uploadIcon={null}
value={null}
title={''}
subtitle={'Drag and drop file here or choose file'}
classNames={{ root: styles.dropzoneRoot }}
onChange={handleChangeDropzone}
dropzoneProps={{

View File

@@ -13,6 +13,8 @@ export function ImportDropzone() {
<Field id={'file'} name={'file'} type="file">
{({ form }) => (
<ImportDropzoneField
title={'Drag and drop files here or click to select files'}
subtitle={''}
value={form.file}
onChange={(file) => {
hideAlerts();