a better abstraction of download buttons

This commit is contained in:
spencerwooo
2021-12-29 15:23:47 +08:00
parent 0613e035b2
commit 5bc8fc4a67
14 changed files with 161 additions and 121 deletions
+8 -6
View File
@@ -62,21 +62,23 @@ const Navbar = () => {
className="flex items-center space-x-2 dark:text-white hover:opacity-80"
>
<FontAwesomeIcon icon={['fab', l.name.toLowerCase() as IconName]} />
<span className="text-sm hidden md:inline-block">{l.name}</span>
<span className="text-sm font-medium hidden md:inline-block">{l.name}</span>
</a>
))}
<a href={siteConfig.email} className="flex items-center space-x-2 dark:text-white hover:opacity-80">
<FontAwesomeIcon icon={['far', 'envelope']} />
<span className="text-sm hidden md:inline-block">Email</span>
</a>
{siteConfig.email && (
<a href={siteConfig.email} className="flex items-center space-x-2 dark:text-white hover:opacity-80">
<FontAwesomeIcon icon={['far', 'envelope']} />
<span className="text-sm font-medium hidden md:inline-block">Email</span>
</a>
)}
{tokenPresent && (
<button
className="hover:bg-gray-200 dark:text-white dark:hover:bg-gray-700 flex items-center p-2 space-x-2 rounded"
onClick={() => setIsOpen(true)}
>
<span className="text-sm">Logout</span>
<span className="text-sm font-medium">Logout</span>
<FontAwesomeIcon icon="sign-out-alt" />
</button>
)}