@linzjs/windows 8.5.0 → 8.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,6 @@ import clsx from 'clsx';
4
4
  import { ReactElement, useCallback, useMemo, useState } from 'react';
5
5
 
6
6
  import { LuiModalAsync } from './LuiModalAsync';
7
- import { LuiModalAsyncContent } from './LuiModalAsyncContent';
8
7
  import { LuiModalAsyncCallback, PromiseWithResolve } from './LuiModalAsyncContext';
9
8
  import { LuiModalAsyncHeader } from './LuiModalAsyncHeader';
10
9
  import { useShowAsyncModal } from './useShowAsyncModal';
@@ -23,6 +22,7 @@ export const LuiModalUpload = ({
23
22
  resolve,
24
23
  title,
25
24
  width,
25
+ height,
26
26
  content,
27
27
  ...props
28
28
  }: useLuiModalUploadProps & LuiModalAsyncCallback<File>): ReactElement => {
@@ -32,22 +32,23 @@ export const LuiModalUpload = ({
32
32
  (file: File) => {
33
33
  const error = validateFile?.(file);
34
34
  if (error) {
35
- setErrorMessage(error);
35
+ const errorMessage = props.customFileErrorMessage || error;
36
+ setErrorMessage(errorMessage);
36
37
  } else {
37
38
  resolve(file);
38
39
  }
39
40
  },
40
- [resolve, validateFile],
41
+ [resolve, validateFile, props.customFileErrorMessage],
41
42
  );
42
43
 
43
44
  return (
44
45
  <LuiModalAsync
45
46
  className={clsx('LuiModalPrefab', `LuiModalPrefab-file`)}
46
47
  closeOnOverlayClick={true}
47
- style={{ width: width ?? 512 }}
48
+ style={{ width: width ?? 512, minHeight: height, height: height }}
48
49
  >
49
50
  {title && <LuiModalAsyncHeader title={title ?? 'Upload file...'} closeButton />}
50
- {content && <LuiModalAsyncContent>{content}</LuiModalAsyncContent>}
51
+ {content}
51
52
  <LuiFileInputBox
52
53
  {...props}
53
54
  width={'100%'}
package/package.json CHANGED
@@ -13,7 +13,7 @@
13
13
  "popout"
14
14
  ],
15
15
  "main": "./dist/index.ts",
16
- "version": "8.5.0",
16
+ "version": "8.6.1",
17
17
  "peerDependencies": {
18
18
  "@linzjs/lui": ">=23",
19
19
  "lodash-es": ">=4",