Added custom color for buttons

This commit is contained in:
Mawoka
2022-09-17 21:13:48 +02:00
parent 9cd0a5dab9
commit 4f2478c8e5
5 changed files with 37 additions and 7 deletions
+3 -1
View File
@@ -9,6 +9,7 @@
import { socket } from '$lib/socket';
import Spinner from '../Spinner.svelte';
import { getLocalization } from '$lib/i18n';
import { invertColor } from '$lib/helpers';
const { t } = getLocalization();
@@ -86,7 +87,8 @@
<div class="flex flex-wrap">
{#each question.answers as answer}
<button
class="w-1/2 text-3xl bg-amber-700 my-2 disabled:opacity-60 border border-white"
class="w-1/2 text-3xl my-2 disabled:opacity-60 border border-white"
style="background-color: {answer.color ?? '#B45309'}"
disabled={selected_answer !== undefined}
on:click={() => selectAnswer(answer.answer)}>{answer.answer}</button
>