2021-05-06 07:15:40 +03:00
|
|
|
<script>
|
2021-07-22 08:04:48 +03:00
|
|
|
import ArrowUp16 from 'carbon-icons-svelte/lib/ArrowUp16';
|
|
|
|
|
import Chip from '../Chip/index.svelte';
|
2021-05-06 07:15:40 +03:00
|
|
|
|
|
|
|
|
export let value = 0;
|
2023-05-20 23:53:28 +00:00
|
|
|
export let upVote = () => {};
|
|
|
|
|
export let disabled = false;
|
2021-05-06 07:15:40 +03:00
|
|
|
</script>
|
|
|
|
|
|
2023-05-20 23:53:28 +00:00
|
|
|
<div
|
|
|
|
|
class="vote border-none {disabled ? 'cursor-not-allowed' : 'cursor-pointer'}"
|
|
|
|
|
on:click={disabled ? undefined : upVote}
|
|
|
|
|
>
|
2021-05-06 07:15:40 +03:00
|
|
|
<ArrowUp16 />
|
|
|
|
|
<Chip {value} />
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
.vote {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
align-items: center;
|
|
|
|
|
min-width: 25px;
|
|
|
|
|
width: 25px;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
margin-right: 10px;
|
|
|
|
|
}
|
|
|
|
|
</style>
|