fix: button size

pull/3813/head
Arik Chakma 2 years ago
parent 1c0eee6929
commit edd93b1d1d
  1. 4
      src/components/Login/account-dropdown.tsx
  2. 10
      src/components/Login/account-nav.tsx

@ -18,10 +18,10 @@ export default function AccountDropdown() {
return ( return (
<div className="relative"> <div className="relative">
<button <button
className="flex h-10 w-32 items-center justify-center rounded-full bg-gradient-to-r from-blue-500 to-blue-700 py-2 px-4 text-sm font-medium text-white hover:from-blue-500 hover:to-blue-600" className="flex h-8 w-24 items-center justify-center rounded-full bg-gradient-to-r from-blue-500 to-blue-700 py-2 px-4 text-sm font-medium text-white hover:from-blue-500 hover:to-blue-600"
onClick={() => setIsOpen((p) => !p)} onClick={() => setIsOpen((p) => !p)}
> >
<span className="mr-2">Account</span> <span>Account</span>
</button> </button>
<div <div

@ -1,6 +1,4 @@
import Cookies from 'js-cookie';
import { useAuth } from '../../hooks/use-auth'; import { useAuth } from '../../hooks/use-auth';
import { TOKEN_COOKIE_NAME } from '../../lib/utils';
import AccountDropdown from './account-dropdown'; import AccountDropdown from './account-dropdown';
export default function AccountNavigation() { export default function AccountNavigation() {
@ -11,7 +9,7 @@ export default function AccountNavigation() {
return ( return (
<div> <div>
{isLoading ? ( {isLoading ? (
<div className="flex h-10 w-32 items-center justify-center rounded-full bg-gradient-to-r from-blue-500 to-blue-700 py-2 px-4 text-sm text-white hover:from-blue-500 hover:to-blue-600"> <div className="flex h-8 w-24 items-center justify-center rounded-full bg-gradient-to-r from-blue-500 to-blue-700 py-2 px-4 text-sm text-white hover:from-blue-500 hover:to-blue-600">
<Spinner className="text-white" /> <Spinner className="text-white" />
</div> </div>
) : ( ) : (
@ -20,10 +18,10 @@ export default function AccountNavigation() {
<AccountDropdown /> <AccountDropdown />
) : ( ) : (
<a <a
className="flex h-10 w-32 cursor-pointer items-center justify-center rounded-full bg-gradient-to-r from-blue-500 to-blue-700 py-2 px-4 text-sm font-medium text-white hover:from-blue-500 hover:to-blue-600" className="flex h-8 w-24 cursor-pointer items-center justify-center rounded-full bg-gradient-to-r from-blue-500 to-blue-700 py-2 px-4 text-sm font-medium text-white hover:from-blue-500 hover:to-blue-600"
href="/signup" href="/signup"
> >
<span className="mr-2">Register</span> <span>Register</span>
</a> </a>
)} )}
</> </>
@ -32,7 +30,7 @@ export default function AccountNavigation() {
); );
} }
export function Spinner({className}: {className?: string}) { export function Spinner({ className }: { className?: string }) {
return ( return (
<svg <svg
className={`h-5 w-5 animate-spin ${className}`} className={`h-5 w-5 animate-spin ${className}`}

Loading…
Cancel
Save