Skip to content

Commit f9b0933

Browse files
authored
Merge pull request #192 from yatikakain/main
Improve Toggle Button with Wikipedia Logo & Tooltip (#191)
2 parents b83a01c + 30fb408 commit f9b0933

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

extension/src/pages/text_input/TextInput.jsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ import logo from "../../assets/aossie_logo.webp";
55
import stars from "../../assets/stars.png";
66
import cloud from "../../assets/cloud.png";
77
import arrow from "../../assets/arrow.png";
8-
import { FaClipboard } from "react-icons/fa";
9-
import Switch from "react-switch";
8+
import { FaClipboard , FaWikipediaW } from "react-icons/fa";
109

1110
function Second() {
1211
const [text, setText] = useState("");
@@ -298,14 +297,15 @@ function Second() {
298297
</button>
299298
</div>
300299
<div className="items-center bg-[#202838] text-white rounded-xl px-2 py-2">
301-
<Switch
302-
checked={isToggleOn}
303-
onChange={toggleSwitch}
304-
offColor="#FF005C"
305-
onColor="#00CBE7"
306-
height={24}
307-
width={44}
308-
/>
300+
<button
301+
title={isToggleOn ? "Disable Wikipedia Context" : "Enable Wikipedia Context"}
302+
onClick={toggleSwitch}
303+
className={`p-1 rounded-md transition
304+
${isToggleOn ? "bg-green-500 text-white" : "bg-gray-400 text-gray-300"}
305+
`}
306+
>
307+
<FaWikipediaW className="text-2xl" />
308+
</button>
309309
</div>
310310
</div>
311311
<div className="flex my-2 justify-center gap-6 items-start">

0 commit comments

Comments
 (0)