Added radio btn marker visibility customization in disabled state (#4151)

Signed-off-by: Oleg Solodkov <oleg.solodkov@xored.com>
This commit is contained in:
Oleg Solodkov 2023-12-06 12:32:17 +04:00 committed by GitHub
parent 7a2c4416d2
commit d9d3a46d0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View File

@ -431,6 +431,15 @@
}
}
}
&.marker-visible.checked {
.marker {
background-color: var(--primary-button-disabled);
&::after {
content: '';
}
}
}
&.disabled {
cursor: not-allowed;

View File

@ -29,6 +29,7 @@
export let action: () => void = () => {}
export let gap: 'large' | 'small' | 'medium' | 'none' = 'none'
export let labelGap: 'large' | 'medium' = 'medium'
export let isMarkerVisible: boolean = false
</script>
<!-- svelte-ignore a11y-click-events-have-key-events -->
@ -38,6 +39,7 @@
class:disabled
class:checked={group === value}
tabindex="-1"
class:marker-visible={isMarkerVisible}
on:click={() => {
if (!disabled && group !== value) action()
}}