Remove CarouselChild
This commit is contained in:
		| @@ -1,38 +0,0 @@ | ||||
| <script> | ||||
|   import { onMount } from 'svelte' | ||||
|   import { fly } from 'svelte/transition'; | ||||
|   import { custom } from './transition' | ||||
|  | ||||
|   import { generateId } from './utils/id' | ||||
|   import { store } from './store' | ||||
|  | ||||
|   let container | ||||
|   const id = generateId()  | ||||
|   onMount(() => { | ||||
|     store.setItem(id) | ||||
|   }) | ||||
|  | ||||
|   let isActive = false | ||||
|   $: { | ||||
|     isActive = id === $store.currentItemId | ||||
|     // console.log(container && container.clientWidth) | ||||
|     // if (container) container.style.left = `${-container.clientWidth + 50}px` | ||||
|   } | ||||
|  | ||||
|   const getW = () => { | ||||
|     return container && container.clientWidth || 0 | ||||
|   } | ||||
| </script> | ||||
|  | ||||
| <div | ||||
|   bind:this={container} | ||||
|   class="main-container" | ||||
| > | ||||
|   <slot></slot> | ||||
| </div> | ||||
|  | ||||
| <style> | ||||
|   .main-container { | ||||
|     background-color: darkgrey; | ||||
|   } | ||||
| </style> | ||||
| @@ -1,6 +1,5 @@ | ||||
| <script> | ||||
|   import ImageCarousel from '../ImageCarousel.svelte' | ||||
|   import CarouselChild from '../CarouselChild.svelte' | ||||
|  | ||||
|   /** | ||||
|    * Enable Next/Previos arrows | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Vadim
					Vadim