File tree 3 files changed +4
-6
lines changed
keybr-widget/lib/components/optionlist
3 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -181,7 +181,7 @@ function FontProp(): ReactNode {
181
181
< OptionList
182
182
options = { Font . ALL . map ( ( item ) => ( {
183
183
value : item . id ,
184
- name : item . name ,
184
+ name : < span style = { item . cssProperties } > { item . name } </ span > ,
185
185
} ) ) }
186
186
value = { settings . get ( textDisplayProps . font ) . id }
187
187
onSelect = { ( id ) => {
Original file line number Diff line number Diff line change @@ -225,9 +225,7 @@ export class OptionList
225
225
className = { styles . placeholder }
226
226
onClick = { this . handlePlaceholderClick }
227
227
>
228
- < span className = { styles . placeholderName } title = { selectedOption . name } >
229
- { selectedOption . name }
230
- </ span >
228
+ < span className = { styles . placeholderName } > { selectedOption . name } </ span >
231
229
< span className = { styles . placeholderArrow } >
232
230
{ open ? "\u25BC" : "\u25BA" }
233
231
</ span >
@@ -244,7 +242,6 @@ export class OptionList
244
242
option === selectedOption && styles . item_selected ,
245
243
index === highlightedIndex && styles . item_highlighted ,
246
244
) }
247
- title = { option . name }
248
245
onMouseOver = { this . handleItemMouseOver ( option ) }
249
246
onClick = { this . handleItemClick ( option ) }
250
247
>
Original file line number Diff line number Diff line change
1
+ import { type ReactNode } from "react" ;
1
2
import { type FocusProps } from "../props.ts" ;
2
3
import { type ClassName } from "../types.ts" ;
3
4
4
5
export type OptionListOption = {
5
6
readonly value : string ;
6
- readonly name : string ;
7
+ readonly name : ReactNode ;
7
8
} ;
8
9
9
10
export type OptionListProps = {
You can’t perform that action at this time.
0 commit comments