-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(docs): add get help button and mobile section
- Loading branch information
1 parent
a46ee99
commit e645742
Showing
6 changed files
with
215 additions
and
22 deletions.
There are no files selected for viewing
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,65 @@ | ||
import { useRef, useState } from "react"; | ||
|
||
import clsx from "clsx"; | ||
|
||
import { DISCORD_INVITE_LINK } from "@/utils/constants"; | ||
|
||
import { Icon } from "@iconify/react"; | ||
import questionFill from "@iconify/icons-ph/question-fill"; | ||
|
||
export function GetHelpButton() { | ||
const dialogRef = useRef<HTMLDialogElement>(null); | ||
|
||
return ( | ||
<> | ||
<dialog | ||
ref={dialogRef} | ||
className={clsx( | ||
"fixed top-[calc(100vh-18rem)] left-[calc(100vw-20rem)] m-0 bg-primary-100 text-black dark:bg-primary-900 dark:text-white dark:border p-0 z-[1000] w-60 backdrop:bg-black/75", | ||
)} | ||
> | ||
<form method="dialog" className="w-full text-right"> | ||
<button className="p-1 m-2" autoFocus> | ||
close | ||
</button> | ||
</form> | ||
<div className="flex flex-col gap-4 p-4 pt-0"> | ||
<div> | ||
<strong>Need help?</strong> Check out our{" "} | ||
<a href={DISCORD_INVITE_LINK} className="always-underline"> | ||
Discord. | ||
</a> | ||
</div> | ||
|
||
<div> | ||
<strong>Enterprise or Open Source?</strong> Reach out directly on | ||
our{" "} | ||
<a href="/services" className="always-underline"> | ||
Services | ||
</a>{" "} | ||
page. | ||
</div> | ||
</div> | ||
</dialog> | ||
<button | ||
className="fixed bottom-4 right-4 rounded-full" | ||
onClick={() => { | ||
if (!dialogRef.current) { | ||
return; | ||
} | ||
if (dialogRef.current.open) { | ||
dialogRef.current.close(); | ||
} else { | ||
dialogRef.current.showModal(); | ||
} | ||
}} | ||
> | ||
<Icon | ||
icon={questionFill} | ||
width={"4rem"} | ||
className="text-primary-500 bg-white rounded-full" | ||
/> | ||
</button> | ||
</> | ||
); | ||
} |
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,15 @@ | ||
--- | ||
import { DISCORD_INVITE_LINK } from "@/utils/constants"; | ||
--- | ||
|
||
<div class="p-4 flex flex-col gap-4 bg-primary-100 dark:bg-primary-800"> | ||
<span> | ||
<strong>Need help?</strong> Check out our <a class="always-underline" href={DISCORD_INVITE_LINK}>Discord.</a> | ||
</span> | ||
|
||
<span> | ||
<strong>Enterprise or Open Source?</strong> Reach out directly on our <a class="always-underline" href="/services">Services</a> page. | ||
</span> | ||
</div> |
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 |
---|---|---|
|
@@ -15,7 +15,8 @@ a { | |
padding: 2px; | ||
} | ||
|
||
a:hover { | ||
a:hover, | ||
a.always-underline { | ||
text-decoration: #257ddd underline; | ||
} | ||
|
||
|
Oops, something went wrong.