@linzjs/lui 26.2.0 → 27.0.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 +11 -0
- package/dist/components/Toast/Helpers/ToastTypes.d.ts +10 -3
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/lui.esm.js +3 -3
- package/dist/lui.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/lui.esm.js
CHANGED
|
@@ -42964,15 +42964,15 @@ const toastFunctions = (dispatch) => {
|
|
|
42964
42964
|
const banner = (level, defaults = {}) => (children, config = {}) => {
|
|
42965
42965
|
const options = { ...defaults, ...config };
|
|
42966
42966
|
return toast(({ close: onDismissFn }) => {
|
|
42967
|
-
const onDismiss = options.
|
|
42967
|
+
const onDismiss = options.closeable === false ? undefined : onDismissFn;
|
|
42968
42968
|
return React.createElement(ToastBanner, { level, children, onDismiss });
|
|
42969
42969
|
}, options);
|
|
42970
42970
|
};
|
|
42971
42971
|
return {
|
|
42972
42972
|
toast,
|
|
42973
42973
|
dismiss: (id) => dispatch === null || dispatch === void 0 ? void 0 : dispatch({ type: 'remove', id }),
|
|
42974
|
-
info: banner('info'
|
|
42975
|
-
success: banner('success'
|
|
42974
|
+
info: banner('info'),
|
|
42975
|
+
success: banner('success'),
|
|
42976
42976
|
error: banner('error', { requireDismiss: true }),
|
|
42977
42977
|
warning: banner('warning', { requireDismiss: true }),
|
|
42978
42978
|
plain: banner(),
|