Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Toggle Button with Wikipedia Logo & Tooltip (#191) #192

Merged
merged 1 commit into from
Feb 17, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions extension/src/pages/text_input/TextInput.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import logo from "../../assets/aossie_logo.webp";
import stars from "../../assets/stars.png";
import cloud from "../../assets/cloud.png";
import arrow from "../../assets/arrow.png";
import { FaClipboard } from "react-icons/fa";
import Switch from "react-switch";
import { FaClipboard , FaWikipediaW } from "react-icons/fa";

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