@vue-interface/shadowable
Version:
A Vue shadow mixin.
47 lines (46 loc) • 1 kB
JavaScript
import { defineComponent as s } from "vue";
const t = s({
props: {
/**
* The drop shadow size.
*/
dropShadow: {
type: [Boolean, String],
default: void 0
},
/**
* The shadow class prefix.
*/
dropShadowableClassPrefix: {
type: String,
default: "drop-shadow"
},
/**
* The shadow size.
*/
shadow: {
type: [Boolean, String],
default: void 0
},
/**
* The shadow class prefix.
*/
shadowableClassPrefix: {
type: String,
default: "shadow"
}
},
computed: {
shadowableClass() {
const o = this.dropShadow === !0 ? "" : this.dropShadow && `-${this.dropShadow}`, a = this.shadow === !0 ? "" : this.shadow && `-${this.shadow}`;
return {
[`${this.dropShadowableClassPrefix}${o}`]: !!this.dropShadow,
[`${this.shadowableClassPrefix}${a}`]: !!this.shadow
};
}
}
});
export {
t as Shadowable
};
//# sourceMappingURL=shadowable.js.map