@vuesax-alpha/nightly
Version:
A Component Library for Vue 3
98 lines (95 loc) • 2.08 kB
JavaScript
import '../../../utils/index.mjs';
import '../../../hooks/index.mjs';
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
import { useColorProp } from '../../../hooks/use-common-props/index.mjs';
import { iconPropType } from '../../../utils/vue/icon.mjs';
import { isNumber, isStringNumber } from '../../../utils/types.mjs';
const notificationPosition = [
"top-right",
"top-center",
"top-left",
"bottom-right",
"bottom-center",
"bottom-left"
];
const notificationProps = buildProps({
border: useColorProp,
color: useColorProp,
customClass: {
type: String,
default: ""
},
duration: {
type: Number,
default: 4500
},
flat: { type: Boolean },
icon: {
type: iconPropType
},
iconSize: {
type: String,
default: "1.2rem"
},
id: {
type: String,
default: ""
},
dangerousHtmlString: {
type: Boolean,
default: false
},
content: {
type: definePropType([String, Object]),
default: ""
},
loading: Boolean,
notPadding: Boolean,
offset: {
type: Number,
default: 0
},
onClick: {
type: definePropType(Function),
default: () => void 0
},
onClickClose: {
type: definePropType(Function),
default: () => true
},
onClose: {
type: definePropType(Function),
default: () => void 0
},
position: {
type: definePropType(String),
values: notificationPosition,
default: "bottom-right"
},
progressAuto: { type: Boolean },
shape: {
type: String,
values: ["square", ""],
default: ""
},
showClose: {
type: Boolean,
default: true
},
sticky: { type: Boolean },
title: {
type: String,
default: ""
},
zIndex: { type: Number },
width: {
type: definePropType([String, Number]),
validator: (prop) => ["auto", "full"].includes(prop) || isNumber(prop) || isStringNumber(prop),
default: null
}
});
const notificationEmits = {
destroy: () => true
};
export { notificationEmits, notificationPosition, notificationProps };
//# sourceMappingURL=notification.mjs.map