Fix various type errors with strict mode

This commit is contained in:
Ryan Gossiaux
2021-12-15 14:06:33 -08:00
parent 543c1263e3
commit 5b36ce9404
9 changed files with 96 additions and 64 deletions

View File

@@ -19,11 +19,17 @@
modifiers: [{ name: "offset", options: { offset: [0, 10] } }],
};
function classNames(...classes) {
function classNames(...classes: unknown[]) {
return classes.filter(Boolean).join(" ");
}
function resolveClass({ active, disabled }) {
function resolveClass({
active,
disabled,
}: {
active: boolean;
disabled: boolean;
}) {
return classNames(
"flex justify-between w-full px-4 py-2 text-sm leading-5 text-left",
active ? "bg-gray-100 text-gray-900" : "text-gray-700",