<script>
import Timeline from './Timeline.svelte'
let events = []
function add({detail: {type, point}}) {
events = [...events, { type, x: point ? point.x : 0 }]
}
</script>
<h1>Insert-at-point example</h1>
<p>Right click to insert an item.</p>
<Timeline on:add={add} {events}/>
<style>
:global(body) {
display: flex;
justify-content: center;
flex-direction: column;
place-items: center;
}
</style>