-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
79 changed files
with
2,760 additions
and
11,975 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+32.5 KB
.yarn/cache/react-children-utilities-npm-2.8.0-ddc33d9adb-10d023529e.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { ReactNode } from 'react' | ||
|
||
export const Toggle = ({ | ||
children, | ||
onChange, | ||
value, | ||
}: { | ||
children: ReactNode | ||
onChange: (value: boolean) => void | ||
value?: boolean | ||
}) => ( | ||
<label className="relative inline-flex items-center cursor-pointer"> | ||
<input | ||
type="checkbox" | ||
checked={value} | ||
value={value ? 'true' : 'false'} | ||
className="sr-only peer" | ||
onChange={(e) => { | ||
console.log('checked:', e.target.checked) | ||
onChange(Boolean(e.target.checked)) | ||
}} | ||
/> | ||
<div className="w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"></div> | ||
<span className="ml-3 text-sm font-medium text-gray-900 dark:text-gray-800"> | ||
{children} | ||
</span> | ||
</label> | ||
) |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.