aio-popup 6.0.2 → 6.0.3
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/index.css +1 -1
- package/index.d.ts +1 -1
- package/index.js +3 -3
- package/package.json +1 -1
package/index.css
CHANGED
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -155,7 +155,7 @@ const usePopup = (props) => {
|
|
|
155
155
|
item.onClose();
|
|
156
156
|
}
|
|
157
157
|
};
|
|
158
|
-
const addAlert = (obj) => Alert(obj);
|
|
158
|
+
const addAlert = (obj) => Alert(Object.assign({ rtl: props === null || props === void 0 ? void 0 : props.rtl }, obj));
|
|
159
159
|
const addHighlight = (highlight) => setHighlight(highlight);
|
|
160
160
|
const removeHighlight = () => setHighlight(undefined);
|
|
161
161
|
const addConfirm = (obj) => {
|
|
@@ -516,7 +516,7 @@ const SnackebarBar = () => {
|
|
|
516
516
|
return _jsx("div", { className: 'aio-popup-snackebar-bar', style: { transition: `${item.time || 8}s linear` } });
|
|
517
517
|
};
|
|
518
518
|
export function Alert(props) {
|
|
519
|
-
let { icon, type = '', title = '', text = '', time = 10, className, closeText = 'Close', onClose,
|
|
519
|
+
let { icon, type = '', title = '', text = '', time = 10, className, closeText = 'Close', onClose, rtl } = props;
|
|
520
520
|
let $$ = {
|
|
521
521
|
id: '',
|
|
522
522
|
time: 0,
|
|
@@ -536,7 +536,7 @@ export function Alert(props) {
|
|
|
536
536
|
<div class='aio-popup-alert-header'>${$$.getIcon()}</div>
|
|
537
537
|
<div class='aio-popup-alert-body aio-popup-scroll'>
|
|
538
538
|
<div class='aio-popup-alert-title'>${ReactDOMServer.renderToStaticMarkup(title)}</div>
|
|
539
|
-
<div class='aio-popup-alert-text' style="text-align:${
|
|
539
|
+
<div class='aio-popup-alert-text' style="text-align:${rtl ? 'right' : 'left'}">${text}</div>
|
|
540
540
|
</div>
|
|
541
541
|
<div class='aio-popup-alert-footer'>
|
|
542
542
|
<button class='aio-popup-alert-close ${$$.id}'>${closeText}</button>
|