summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/components/shared/RadioButtonSelect.tsx
diff options
context:
space:
mode:
authorMiguel Solorio <[email protected]>2025-08-15 15:39:54 -0700
committerGitHub <[email protected]>2025-08-15 22:39:54 +0000
commit3c0af3654ac5491e79c6f9b55de5debf0e1e13c1 (patch)
tree51eabe9544038b06b0c0a78d31dfa25232de3754 /packages/cli/src/ui/components/shared/RadioButtonSelect.tsx
parent5246aa11f49108a22d4ba306a49b1af79153cac1 (diff)
Update semantic color tokens (#6253)
Co-authored-by: jacob314 <[email protected]>
Diffstat (limited to 'packages/cli/src/ui/components/shared/RadioButtonSelect.tsx')
-rw-r--r--packages/cli/src/ui/components/shared/RadioButtonSelect.tsx32
1 files changed, 19 insertions, 13 deletions
diff --git a/packages/cli/src/ui/components/shared/RadioButtonSelect.tsx b/packages/cli/src/ui/components/shared/RadioButtonSelect.tsx
index 746744e5..b6c78feb 100644
--- a/packages/cli/src/ui/components/shared/RadioButtonSelect.tsx
+++ b/packages/cli/src/ui/components/shared/RadioButtonSelect.tsx
@@ -6,7 +6,7 @@
import React, { useEffect, useState, useRef } from 'react';
import { Text, Box } from 'ink';
-import { Colors } from '../../colors.js';
+import { theme } from '../../semantic-colors.js';
import { useKeypress } from '../../hooks/useKeypress.js';
/**
@@ -164,7 +164,9 @@ export function RadioButtonSelect<T>({
return (
<Box flexDirection="column">
{showScrollArrows && (
- <Text color={scrollOffset > 0 ? Colors.Foreground : Colors.Gray}>
+ <Text
+ color={scrollOffset > 0 ? theme.text.primary : theme.text.secondary}
+ >
</Text>
)}
@@ -172,18 +174,18 @@ export function RadioButtonSelect<T>({
const itemIndex = scrollOffset + index;
const isSelected = activeIndex === itemIndex;
- let textColor = Colors.Foreground;
- let numberColor = Colors.Foreground;
+ let textColor = theme.text.primary;
+ let numberColor = theme.text.primary;
if (isSelected) {
- textColor = Colors.AccentGreen;
- numberColor = Colors.AccentGreen;
+ textColor = theme.status.success;
+ numberColor = theme.status.success;
} else if (item.disabled) {
- textColor = Colors.Gray;
- numberColor = Colors.Gray;
+ textColor = theme.text.secondary;
+ numberColor = theme.text.secondary;
}
if (!showNumbers) {
- numberColor = Colors.Gray;
+ numberColor = theme.text.secondary;
}
const numberColumnWidth = String(items.length).length;
@@ -194,7 +196,9 @@ export function RadioButtonSelect<T>({
return (
<Box key={item.label} alignItems="center">
<Box minWidth={2} flexShrink={0}>
- <Text color={isSelected ? Colors.AccentGreen : Colors.Foreground}>
+ <Text
+ color={isSelected ? theme.status.success : theme.text.primary}
+ >
{isSelected ? '●' : ' '}
</Text>
</Box>
@@ -208,7 +212,9 @@ export function RadioButtonSelect<T>({
{item.themeNameDisplay && item.themeTypeDisplay ? (
<Text color={textColor} wrap="truncate">
{item.themeNameDisplay}{' '}
- <Text color={Colors.Gray}>{item.themeTypeDisplay}</Text>
+ <Text color={theme.text.secondary}>
+ {item.themeTypeDisplay}
+ </Text>
</Text>
) : (
<Text color={textColor} wrap="truncate">
@@ -222,8 +228,8 @@ export function RadioButtonSelect<T>({
<Text
color={
scrollOffset + maxItemsToShow < items.length
- ? Colors.Foreground
- : Colors.Gray
+ ? theme.text.primary
+ : theme.text.secondary
}
>