diff --git a/src/components/IconButton.tsx b/src/components/IconButton.tsx index 34de2ebe..a8076e1e 100644 --- a/src/components/IconButton.tsx +++ b/src/components/IconButton.tsx @@ -4,14 +4,14 @@ import { cc } from '@/utility/css'; import Spinner, { SpinnerColor } from './Spinner'; export default function IconButton({ - children, + icon, onClick, isLoading, className, spinnerColor, spinnerSize, }: { - children: React.ReactNode + icon: JSX.Element onClick?: () => void isLoading?: boolean className?: string @@ -32,7 +32,7 @@ export default function IconButton({ 'active:opacity-50', )} > - {children} + {icon} : startTransition(() => router.push(path))} isLoading={shouldShowLoader} @@ -51,8 +52,6 @@ export default function IconPathButton({ 'dark:text-gray-400 dark:active:text-gray-300', )} spinnerColor="text" - > - {children} - + /> ); } diff --git a/src/photo/SharePhotoButton.tsx b/src/photo/SharePhotoButton.tsx index 4b0cdd7d..9930bbbc 100644 --- a/src/photo/SharePhotoButton.tsx +++ b/src/photo/SharePhotoButton.tsx @@ -12,10 +12,9 @@ export default function SharePhotoButton({ }) { return ( } path={pathForPhoto(photo, true)} prefetch={prefetch} - > - - + /> ); } diff --git a/src/site/SiteChecklistClient.tsx b/src/site/SiteChecklistClient.tsx index 3de6b91d..3a0761d2 100644 --- a/src/site/SiteChecklistClient.tsx +++ b/src/site/SiteChecklistClient.tsx @@ -138,6 +138,7 @@ export default function SiteChecklistClient({ {secret}
} onClick={() => { navigator.clipboard.writeText(secret); toast( @@ -147,16 +148,13 @@ export default function SiteChecklistClient({ }, ); }} - > - - + /> } onClick={refreshSecret} isLoading={isPendingSecret} spinnerColor="text" - > - - + />