<script>
import {flip} from 'svelte/animate';
import {crossfade} from 'svelte/transition';
const [send, receive] = crossfade({});
let left = ['red', 'orange', 'green', 'purple'];
let right = ['yellow', 'blue'];
function move(item, from, to) {
to.push(item);
return [from.filter(i => i !== item), to];
}
function moveLeft(item) {
[right, left] = move(item, right, left);
}
function moveRight(item) {
[left, right] = move(item, left, right);
console
}
</script>
<style>
button {
background-color: cornflowerblue;
border: none;
color: white;
padding: 10px;
margin-bottom: 10px;
width: 100%;
}
.list {
display: inline-block;
margin-right: 30px;