Dynamic Theme Update
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<script lang="ts">
|
||||
import Icon from '@iconify/svelte';
|
||||
import { getButtonStyle, parseColorText, getSegmentStyle } from './utils';
|
||||
import { themeColors } from '$lib/stores/theme';
|
||||
import type { TerminalLine, FormOption } from './types';
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
import '$lib/assets/css/tui-radio.css';
|
||||
@@ -13,7 +14,7 @@
|
||||
change: string;
|
||||
}>();
|
||||
|
||||
$: labelSegments = line.content ? parseColorText(line.content) : [];
|
||||
$: labelSegments = line.content ? parseColorText(line.content, $themeColors.colorMap) : [];
|
||||
$: options = line.radioOptions || [];
|
||||
$: isDisabled = line.inputDisabled || false;
|
||||
$: isHorizontal = line.radioHorizontal || false;
|
||||
@@ -63,7 +64,7 @@
|
||||
<div class="radio-options" class:horizontal={isHorizontal}>
|
||||
{#each options as option}
|
||||
{@const isSelected = value === option.value}
|
||||
{@const optionSegments = parseColorText(option.label)}
|
||||
{@const optionSegments = parseColorText(option.label, $themeColors.colorMap)}
|
||||
<div
|
||||
class="radio-option"
|
||||
class:selected={isSelected}
|
||||
|
||||
Reference in New Issue
Block a user