@linzjs/lui 11.0.0 → 11.1.0

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [11.1.0](https://github.com/linz/lui/compare/v11.0.0...v11.1.0) (2021-12-06)
2
+
3
+
4
+ ### Features
5
+
6
+ * adds custom error message to LuiFileImport ([#482](https://github.com/linz/lui/issues/482)) ([7ffaf16](https://github.com/linz/lui/commit/7ffaf168b364291ec436f4df5f91fdc869535f32))
7
+
1
8
  # [11.0.0](https://github.com/linz/lui/compare/v10.11.5...v11.0.0) (2021-12-06)
2
9
 
3
10
 
@@ -4,6 +4,7 @@ export interface Props {
4
4
  fileFormatText?: string;
5
5
  onValidFileSelected: (file: File) => void;
6
6
  showMustSelectFileError?: boolean;
7
+ customFileErrorMessage?: string;
7
8
  width?: number;
8
9
  height?: number;
9
10
  }
@@ -4,4 +4,5 @@ declare const _default: import("@storybook/react").Meta<import("./LuiFileInputBo
4
4
  export default _default;
5
5
  export declare const LuiFileInputWithExtensionFilterDefaultSize: ComponentStory<typeof LuiFileInputBox>;
6
6
  export declare const LuiFileInputWithExtensionFilterLargeWithExistingError: ComponentStory<typeof LuiFileInputBox>;
7
+ export declare const LuiFileInputWithExtensionFilterLargeWithExistingErrorCustomMessage: ComponentStory<typeof LuiFileInputBox>;
7
8
  export declare const LuiFileInputUploadSuccessForChromatic: ComponentStory<typeof FileUploadInfo>;
@@ -6912,7 +6912,7 @@ var LuiFileInputBox = function LuiFileInputBox(props) {
6912
6912
  name: "ic_error_outline",
6913
6913
  size: 'ns',
6914
6914
  alt: "Error"
6915
- })), React__default.createElement("p", {
6915
+ })), props.customFileErrorMessage ? React__default.createElement("p", null, props.customFileErrorMessage) : React__default.createElement("p", {
6916
6916
  className: "LuiFileInputBox-upload-text"
6917
6917
  }, "You must select a file with extension of", ' ', extensionsAsHumanReadableList(props.acceptedExtensions), ".")));
6918
6918
  };