File size: 682 Bytes
ef03766
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<script lang="ts">
	import { createEventDispatcher } from 'svelte';
    import IconCommunity from "./IconCommunity.svelte";
    import IconSpinner from "./IconSpinner.svelte";

    export let isUploading: boolean;

	const dispatch = createEventDispatcher();
    function handleClick(){
		dispatch('createCommunityPost');
    }
</script>

<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>