-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy paththeme.ts
39 lines (34 loc) · 765 Bytes
/
theme.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import {type BoxProps, type TextProps} from 'ink';
import {type ComponentTheme} from '../../theme.js';
const theme = {
styles: {
container: (): BoxProps => ({
flexDirection: 'column',
}),
option: ({isFocused}): BoxProps => ({
gap: 1,
paddingLeft: isFocused ? 0 : 2,
}),
selectedIndicator: (): TextProps => ({
color: 'green',
}),
focusIndicator: (): TextProps => ({
color: 'blue',
}),
label({isFocused, isSelected}): TextProps {
let color: string | undefined;
if (isSelected) {
color = 'green';
}
if (isFocused) {
color = 'blue';
}
return {color};
},
highlightedText: (): TextProps => ({
bold: true,
}),
},
} satisfies ComponentTheme;
export default theme;
export type Theme = typeof theme;