Skip to content

Commit

Permalink
fix: add tooltip message on information icon hover (#421)
Browse files Browse the repository at this point in the history
Fixes #366
  • Loading branch information
OgDev-01 committed Sep 22, 2022
1 parent 20fbc9f commit 12ff851
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions components/atoms/ToggleOption/toggle-option.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,23 @@ import { HiInformationCircle } from "react-icons/hi";
interface ToogleOptionProps {
optionText: string;
withIcon?: boolean;
checked: boolean
handleToggle: ()=> void;
checked: boolean;
handleToggle: () => void;
}
const ToggleOption = ({ optionText, withIcon , checked, handleToggle}: ToogleOptionProps): JSX.Element => {
const ToggleOption = ({ optionText, withIcon, checked, handleToggle }: ToogleOptionProps): JSX.Element => {
return (
<div
onClick={handleToggle}
className="inline-flex cursor-pointer items-center gap-2 rounded-md px-2 py-0.5 border border-light-slate-6 bg-light-slate-1"
>
<ToggleSwitch handleToggle={handleToggle} name={optionText} checked={checked} />
<span className="text-light-slate-11">{optionText}</span>
{withIcon && <HiInformationCircle className="text-light-slate-9" />}
{withIcon && (
<HiInformationCircle
title="An outside contributor is not a member the organization"
className="text-light-slate-9"
/>
)}
</div>
);
};
Expand Down

0 comments on commit 12ff851

Please sign in to comment.