@empathyco/x-components
Version:
Empathy X Components
31 lines (28 loc) • 728 B
JavaScript
import { defineComponent, toRef, provide } from 'vue';
/**
* Location Provider component.
* This component injects the location with value passed as prop.
*
* @public
*/
var _sfc_main = defineComponent({
name: 'LocationProvider',
props: {
/**
* The {@link FeatureLocation} to provide.
*
* @public
*/
location: {
type: String,
required: true,
},
},
setup(props, { slots }) {
const featureLocation = toRef(props, 'location');
provide('location', featureLocation);
return () => slots.default?.()[0] ?? '';
},
});
export { _sfc_main as default };
//# sourceMappingURL=location-provider.vue.js.map