Update buttons

This commit is contained in:
freearhey 2023-10-10 18:10:35 +03:00
parent 53b4de0132
commit 5db8d14b33
6 changed files with 17 additions and 15 deletions

View file

@ -1,16 +1,18 @@
<script>
export let disabled = false
export let active = false
</script>
<button
{...$$restProps}
class="rounded-md transition-colors duration-200 border border-transparent text-white text-sm font-semibold text-center px-4 h-10 flex items-center justify-center space-x-3 shrink-0 min-w-14 w-auto"
class:bg-gray-200={disabled}
class:bg-primary-600={!disabled}
class:dark:bg-gray-700={disabled}
class:dark:hover:bg-primary-500={!disabled}
class:hover:bg-gray-200={disabled}
class:hover:bg-primary-700={!disabled}
class="rounded-md transition-colors duration-200 border border-transparent text-white text-sm font-semibold text-center h-10 flex items-center justify-center space-x-3 px-4"
class:bg-gray-200={disabled || active}
class:bg-primary-600={!disabled && !active}
class:dark:bg-gray-700={disabled || active}
class:dark:hover:bg-primary-500={!disabled && !active}
class:dark:hover:bg-gray-700={active}
class:hover:bg-gray-200={disabled || active}
class:hover:bg-primary-700={!disabled && !active}
class:pointer-events-none={disabled}
on:click
>