@nextcloud/vue
Version:
Nextcloud vue components
44 lines (43 loc) • 1.73 kB
JavaScript
import "../assets/index55.css";
import o from "vue-material-design-icons/CheckboxMarkedCircle.vue";
import n from "vue-material-design-icons/AlertDecagram.vue";
import t from "vue-material-design-icons/Alert.vue";
import a from "vue-material-design-icons/Information.vue";
import { n as s } from "../chunks/_plugin-vue2_normalizer-5b4c43a4.mjs";
const c = { name: "NcNoteCard", props: { type: { type: String, default: "warning", validator: (r) => ["success", "info", "warning", "error"].includes(r) }, showAlert: { type: Boolean, default: !1 }, heading: { type: String, default: "" } }, computed: { shouldShowAlert() {
return this.showAlert || this.type === "error";
}, icon() {
switch (this.type) {
case "error":
return n;
case "success":
return o;
case "info":
return a;
case "warning":
return t;
default:
return t;
}
}, color() {
switch (this.type) {
case "error":
return "var(--color-error)";
case "success":
return "var(--color-success)";
case "info":
return "var(--color-info)";
case "warning":
return "var(--color-warning)";
default:
return "var(--color-warning)";
}
} } };
var i = function() {
var r = this, e = r._self._c;
return e("div", { staticClass: "notecard", class: `notecard--${r.type}`, attrs: { role: r.shouldShowAlert ? "alert" : "" } }, [e(r.icon, { tag: "component", staticClass: "notecard__icon", class: { "notecard__icon--heading": r.heading }, attrs: { "fill-color": r.color } }), e("div", [r.heading ? e("h2", [r._v(" " + r._s(r.heading) + " ")]) : r._e(), r._t("default")], 2)], 1);
}, l = [], u = s(c, i, l, !1, null, "a0360c76", null, null);
const v = u.exports;
export {
v as default
};