Skip to content
This repository has been archived by the owner on Sep 25, 2024. It is now read-only.

Commit

Permalink
chore: improve switch experience
Browse files Browse the repository at this point in the history
  • Loading branch information
lawvs committed Dec 14, 2023
1 parent 6065799 commit aec3bad
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/Switch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ export default function Switch({
<div className="peer h-6 w-11 rounded-full border bg-slate-200 after:absolute after:left-[2px] after:top-0.5 after:h-5 after:w-5 after:rounded-full after:border after:border-gray-300 after:bg-white after:transition-all after:content-[''] peer-checked:bg-primary peer-checked:after:translate-x-full peer-checked:after:border-white peer-focus:ring-green-300"></div>
</label>

<span className="ml-3 text-gray-900 text-sm">{text}</span>
<span
className="ml-3 text-gray-900 text-sm cursor-default"
onClick={onChange}
>
{text}
</span>
</div>
);
}

0 comments on commit aec3bad

Please sign in to comment.