UNPKG

@dialpad/dialtone

Version:

Dialpad's Dialtone design system monorepo

24 lines (23 loc) 727 B
import { SKELETON_RIPPLE_DURATION as i } from "../../lib/skeleton/skeleton-constants.js"; const s = { computed: { skeletonOffset() { const t = this.$refs.skeleton; if (!t) return this.offset; const { top: n, height: e } = t.getBoundingClientRect(); return n + e / 2; }, skeletonStyle() { const t = {}; if (this.skeletonOffset === -1 || !this.animate && this.animationDuration === -1) return t; const n = this.skeletonOffset * i / 1e3, e = this.animationDuration === -1 ? 1e3 : this.animationDuration; return t.animationDelay = `${n}ms`, t.animationDuration = `${e}ms`, t; } } }; export { s as default }; //# sourceMappingURL=skeleton.js.map