Hey is a decentralized and permissionless social media app built with Lens Protocol 馃尶
1import type { ReactNode } from "react";
2import { H6, Toggle } from "@/components/Shared/UI";
3
4interface ToggleWithHelperProps {
5 description?: ReactNode;
6 disabled?: boolean;
7 heading?: ReactNode;
8 icon?: ReactNode;
9 on: boolean;
10 setOn: (on: boolean) => void;
11}
12
13const ToggleWithHelper = ({
14 description,
15 disabled = false,
16 heading,
17 icon,
18 on,
19 setOn
20}: ToggleWithHelperProps) => {
21 return (
22 <div className="flex items-center justify-between">
23 <div className="flex items-start space-x-3">
24 {icon && <span className="mt-1">{icon}</span>}
25 <div>
26 {heading && <b>{heading}</b>}
27 {description && (
28 <H6 className="font-normal text-gray-500 dark:text-gray-200">
29 {description}
30 </H6>
31 )}
32 </div>
33 </div>
34 <Toggle disabled={disabled} on={on} setOn={setOn} />
35 </div>
36 );
37};
38
39export default ToggleWithHelper;