File size: 846 Bytes
ef03766 bdabd27 ef03766 4d7478b ef03766 bdabd27 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
<script lang="ts">
import { createEventDispatcher } from 'svelte';
import IconCommunity from "./IconCommunity.svelte";
import IconSpinner from "./IconSpinner.svelte";
export let isVisisble: boolean;
export let isUploading: boolean;
const dispatch = createEventDispatcher();
function handleClick(){
if(isUploading){
return;
}
dispatch('createCommunityPost');
}
</script>
{#if isVisisble}
<div class="flex items-center justify-center bg-black w-[12.5rem] px-2 py-1 gap-x-2 rounded-full cursor-pointer"
on:click={handleClick}
>
{#if isUploading}
<IconSpinner classNames="text-white animate-spin" />
{:else}
<IconCommunity/>
{/if}
<p class="text-white font-semibold">Share to community</p>
</div>
{/if}
|