<script>
	export let delay = 0;
</script>

<div style="--delay: {delay}ms">
	<slot />
</div>

<style>
	div {
		opacity: 0;
		animation: fadeIn 1s ease forwards;
		animation-delay: var(--delay);
	}

	@keyframes fadeIn {
		from {
			opacity: 0;
		}
		to {
			opacity: 1;
		}
	}
</style>
