@empathyco/x-components
Version:
Empathy X Components
40 lines (37 loc) • 1.43 kB
JavaScript
import { defineComponent, ref, computed } from 'vue';
import _sfc_main$1 from '../../x-modules/scroll/components/main-scroll.vue.js';
import Scroll from '../../x-modules/scroll/components/scroll.vue.js';
import { animateTranslate } from '../animations/animate-translate/animate-translate.factory.js';
import BaseIdModal from '../modals/base-id-modal.vue.js';
/**
* Component for use as Layout to be filled with the rest of the components.
*
* @deprecated - The layout has been deprecated in favor of using new XDS layout.
*
* @public
*/
var _sfc_main = defineComponent({
name: 'FixedHeaderAndAsidesLayout',
components: { BaseIdModal, MainScroll: _sfc_main$1, Scroll },
props: {
/** Enables the devMode, which shows the available slots to use with its names. */
devMode: Boolean,
},
setup() {
const scrollPosition = ref(0);
const rightAsideAnimation = animateTranslate('right');
const leftAsideAnimation = animateTranslate('left');
const setPosition = (position) => {
scrollPosition.value = position;
};
const isBackdropVisible = computed(() => scrollPosition.value > 0);
return {
rightAsideAnimation,
leftAsideAnimation,
setPosition,
isBackdropVisible,
};
},
});
export { _sfc_main as default };
//# sourceMappingURL=fixed-header-and-asides-layout.vue2.js.map