mirror of
				https://github.com/mealie-recipes/mealie.git
				synced 2025-10-31 02:03:35 -04:00 
			
		
		
		
	* refactor(frontend): ♻️ rewrite migrations UI * refactor(backend): ♻️ rewrite recipe migrations * remove vue-demi Co-authored-by: hay-kot <hay-kot@pm.me>
		
			
				
	
	
		
			37 lines
		
	
	
		
			681 B
		
	
	
	
		
			Vue
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
		
			681 B
		
	
	
	
		
			Vue
		
	
	
	
	
	
| <template>
 | |
|   <component :is="tag">
 | |
|     <slot name="activator" v-bind="{ toggle, state }"> </slot>
 | |
|     <slot v-bind="{ state, toggle }"></slot>
 | |
|   </component>
 | |
| </template>
 | |
|     
 | |
| <script lang="ts">
 | |
| import { defineComponent, watch } from "@nuxtjs/composition-api";
 | |
| import { useToggle } from "@vueuse/shared";
 | |
| 
 | |
| export default defineComponent({
 | |
|   props: {
 | |
|     value: {
 | |
|       type: Boolean,
 | |
|       default: false,
 | |
|     },
 | |
|     tag: {
 | |
|       type: String,
 | |
|       default: "div",
 | |
|     },
 | |
|   },
 | |
|   setup(_, context) {
 | |
|     const [state, toggle] = useToggle();
 | |
| 
 | |
|     watch(state, () => {
 | |
|       context.emit("input", state);
 | |
|     });
 | |
| 
 | |
|     return {
 | |
|       state,
 | |
|       toggle,
 | |
|     };
 | |
|   },
 | |
| });
 | |
| </script>
 | |
|      |