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 } from './types';
|
||||
import '$lib/assets/css/tui-progress.css';
|
||||
|
||||
@@ -9,8 +10,8 @@
|
||||
|
||||
$: progress = Math.min(100, Math.max(0, line.progress ?? 0));
|
||||
$: label = line.progressLabel || `${progress}%`;
|
||||
$: contentSegments = parseColorText(line.content);
|
||||
$: labelSegments = parseColorText(label);
|
||||
$: contentSegments = parseColorText(line.content, $themeColors.colorMap);
|
||||
$: labelSegments = parseColorText(label, $themeColors.colorMap);
|
||||
</script>
|
||||
|
||||
<div class="tui-progress" class:inline={inline} style="--progress-color: {getButtonStyle(line.style)}">
|
||||
|
||||
Reference in New Issue
Block a user