rename to KeyboardShortcutBadge
This commit is contained in:
parent
f6da5eb0d4
commit
6c2bd1eb64
@ -41,7 +41,7 @@ import useBrowserTabIndicator from "./hooks/useBrowserTabIndicator";
|
||||
import TipLink from "./components/core/TipLink";
|
||||
import SelectAndEditModeToggleButton from "./components/select-and-edit/SelectAndEditModeToggleButton";
|
||||
import { useAppStore } from "./store/app-store";
|
||||
import KeyBadge from "./components/core/KeyBadge";
|
||||
import KeyboardShortcutBadge from "./components/core/KeyboardShortcutBadge";
|
||||
|
||||
const IS_OPENAI_DOWN = false;
|
||||
|
||||
@ -534,7 +534,7 @@ function App() {
|
||||
onClick={() => doUpdate(updateInstruction)}
|
||||
className="dark:text-white dark:bg-gray-700 update-btn"
|
||||
>
|
||||
Update <KeyBadge letter="enter" />
|
||||
Update <KeyboardShortcutBadge letter="enter" />
|
||||
</Button>
|
||||
</div>
|
||||
<div className="flex items-center justify-end gap-x-2 mt-2">
|
||||
|
||||
@ -1,11 +1,13 @@
|
||||
import React from "react";
|
||||
import { BsArrowReturnLeft } from "react-icons/bs";
|
||||
|
||||
interface KeyBadgeProps {
|
||||
interface KeyboardShortcutBadgeProps {
|
||||
letter: string;
|
||||
}
|
||||
|
||||
const KeyBadge: React.FC<KeyBadgeProps> = ({ letter }) => {
|
||||
const KeyboardShortcutBadge: React.FC<KeyboardShortcutBadgeProps> = ({
|
||||
letter,
|
||||
}) => {
|
||||
const icon =
|
||||
letter.toLowerCase() === "enter" || letter.toLowerCase() === "return" ? (
|
||||
<BsArrowReturnLeft />
|
||||
@ -20,4 +22,4 @@ const KeyBadge: React.FC<KeyBadgeProps> = ({ letter }) => {
|
||||
);
|
||||
};
|
||||
|
||||
export default KeyBadge;
|
||||
export default KeyboardShortcutBadge;
|
||||
@ -3,7 +3,7 @@ import { Textarea } from "../ui/textarea";
|
||||
import { Button } from "../ui/button";
|
||||
import { addHighlight, getAdjustedCoordinates, removeHighlight } from "./utils";
|
||||
import { useAppStore } from "../../store/app-store";
|
||||
import KeyBadge from "../core/KeyBadge";
|
||||
import KeyboardShortcutBadge from "../core/KeyboardShortcutBadge";
|
||||
|
||||
interface EditPopupProps {
|
||||
event: MouseEvent | null;
|
||||
@ -140,7 +140,7 @@ const EditPopup: React.FC<EditPopupProps> = ({
|
||||
className="dark:bg-gray-700 dark:text-white"
|
||||
onClick={() => onUpdate(updateText)}
|
||||
>
|
||||
Update <KeyBadge letter="enter" />
|
||||
Update <KeyboardShortcutBadge letter="enter" />
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user