Fixed display of an icon in a button. The shadow is smaller in CircleButton. (#81)

Signed-off-by: Alexander Platov <sas_lord@mail.ru>
This commit is contained in:
Alexander Platov 2021-08-28 14:56:40 +03:00 committed by GitHub
parent a157c113c8
commit 18bd1e4d19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -30,7 +30,7 @@
</script>
<button class="button {size}" class:primary class:transparent disabled={disabled || loading} style={width ? 'width: ' + width : ''} on:click>
{#if icon}
{#if icon && !loading}
<div class="icon">
{#if typeof (icon) === 'string'}
<Icon {icon} size={'small'}/>

View File

@ -51,11 +51,11 @@
&:hover {
background-color: rgba(255, 255, 255, .25);
box-shadow: 0 0 1rem rgba(0, 0, 0, .3);
box-shadow: 0 0 .5rem rgba(0, 0, 0, .3);
}
&:active {
background-color: rgba(255, 255, 255, .15);
box-shadow: 0 0 1rem rgba(0, 0, 0, .1);
box-shadow: 0 0 .5rem rgba(0, 0, 0, .1);
}
}
</style>