CLASSROOMIO-T-80: Replace sapper with sveltekit

This commit is contained in:
Rotimi Best
2023-08-02 19:35:27 +01:00
parent 8ffdf319b3
commit 7dfbb05451
320 changed files with 5207 additions and 18330 deletions
@@ -0,0 +1,47 @@
<script>
import TextChip from '../Chip/Text.svelte';
import ComingSoon from '../ComingSoon/index.svelte';
export let size;
export let hasDivider = false;
export let active = false;
export let avatarText = '';
export let text = '';
export let onClick;
export let disabled = false;
</script>
<div class="relative">
<button
class="{disabled &&
'opacity-25'} flex items-center w-60 py-2 px-3 {hasDivider &&
'border-b border-gray-100'} {active && 'bg-blue-100 dark:bg-gray-500'}"
on:click={onClick}
>
{#if avatarText}
<TextChip
value={avatarText}
className="mr-2 bg-blue-200 font-bold dark:bg-gray-600"
{size}
/>
{/if}
{text}
</button>
{#if disabled}
<div class="coming-soon">
<ComingSoon />
</div>
{/if}
</div>
<style>
button {
min-height: 56px;
}
.coming-soon {
position: absolute;
top: 5px;
right: 5px;
}
</style>