Skip to content

Commit

Permalink
feat: shot font name using the same font
Browse files Browse the repository at this point in the history
  • Loading branch information
aradzie committed Apr 7, 2024
1 parent fdd9b3b commit cc94c33
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/keybr-textinput-ui/lib/TypingSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ function FontProp(): ReactNode {
<OptionList
options={Font.ALL.map((item) => ({
value: item.id,
name: item.name,
name: <span style={item.cssProperties}>{item.name}</span>,
}))}
value={settings.get(textDisplayProps.font).id}
onSelect={(id) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,7 @@ export class OptionList
className={styles.placeholder}
onClick={this.handlePlaceholderClick}
>
<span className={styles.placeholderName} title={selectedOption.name}>
{selectedOption.name}
</span>
<span className={styles.placeholderName}>{selectedOption.name}</span>
<span className={styles.placeholderArrow}>
{open ? "\u25BC" : "\u25BA"}
</span>
Expand All @@ -244,7 +242,6 @@ export class OptionList
option === selectedOption && styles.item_selected,
index === highlightedIndex && styles.item_highlighted,
)}
title={option.name}
onMouseOver={this.handleItemMouseOver(option)}
onClick={this.handleItemClick(option)}
>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { type ReactNode } from "react";
import { type FocusProps } from "../props.ts";
import { type ClassName } from "../types.ts";

export type OptionListOption = {
readonly value: string;
readonly name: string;
readonly name: ReactNode;
};

export type OptionListProps = {
Expand Down

0 comments on commit cc94c33

Please sign in to comment.