checkbox: fix invalid state, shrinking of button
This commit is contained in:
@@ -57,11 +57,11 @@
|
||||
type="button"
|
||||
{id}
|
||||
class={[
|
||||
'text-sui-text flex size-7 appearance-none items-center',
|
||||
'text-sui-text flex size-7 shrink-0 appearance-none items-center',
|
||||
'justify-center rounded-lg shadow transition-all hover:opacity-75',
|
||||
color === 'default' && 'bg-white',
|
||||
color === 'contrast' && 'border-text/40 border bg-white',
|
||||
!valid && 'border-sui-accent-400 border'
|
||||
!valid && 'border border-red-500'
|
||||
]}
|
||||
onclick={() => {
|
||||
if (value === false || value === undefined || value === 'indeterminate') {
|
||||
@@ -86,9 +86,6 @@
|
||||
for={id}
|
||||
>
|
||||
{@render children()}
|
||||
{#if required}
|
||||
<span class="text-sui-accent-400">*</span>
|
||||
{/if}
|
||||
</label>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user