-
Notifications
You must be signed in to change notification settings - Fork 816
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Clickable docs links #274
Conversation
@Aashish-Upadhyay-101 is attempting to deploy a commit to the mftsio Team on Vercel. A member of the Team first needs to authorize it. |
@Aashish-Upadhyay-101 wow nice work! I cannot wait to review this one 🎉 |
components/view/nav.tsx
Outdated
<div className="absolute inset-y-0 right-0 flex items-center pr-2 sm:static sm:inset-auto sm:ml-6 sm:pr-0 space-x-4"> | ||
{embeddedLinks && embeddedLinks.length > 0 && ( | ||
<DropdownMenu> | ||
<DropdownMenuTrigger> | ||
<div className="text-sm font-semibold mr-6"> | ||
Embedded Links | ||
</div> | ||
</DropdownMenuTrigger> | ||
<DropdownMenuContent className="space-y-2 pt-2 px-4"> | ||
{embeddedLinks.map((link, index) => ( | ||
<Link | ||
href={link} | ||
target="_blank" | ||
className="text-sm flex items-start gap-2" | ||
key={index} | ||
> | ||
<span>{index + 1}.</span> | ||
<span className="underline">{link}</span> | ||
</Link> | ||
))} | ||
</DropdownMenuContent> | ||
</DropdownMenu> | ||
)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<div className="absolute inset-y-0 right-0 flex items-center pr-2 sm:static sm:inset-auto sm:ml-6 sm:pr-0 space-x-4"> | |
{embeddedLinks && embeddedLinks.length > 0 && ( | |
<DropdownMenu> | |
<DropdownMenuTrigger> | |
<div className="text-sm font-semibold mr-6"> | |
Embedded Links | |
</div> | |
</DropdownMenuTrigger> | |
<DropdownMenuContent className="space-y-2 pt-2 px-4"> | |
{embeddedLinks.map((link, index) => ( | |
<Link | |
href={link} | |
target="_blank" | |
className="text-sm flex items-start gap-2" | |
key={index} | |
> | |
<span>{index + 1}.</span> | |
<span className="underline">{link}</span> | |
</Link> | |
))} | |
</DropdownMenuContent> | |
</DropdownMenu> | |
)} | |
<div className="absolute inset-y-0 right-0 flex items-center pr-2 sm:static sm:inset-auto sm:ml-6 sm:pr-0 space-x-4"> | |
{embeddedLinks && embeddedLinks.length > 0 ? ( | |
<DropdownMenu> | |
<DropdownMenuTrigger> | |
<div className="text-sm font-semibold mr-6"> | |
Embedded Links | |
</div> | |
</DropdownMenuTrigger> | |
<DropdownMenuContent className="space-y-2 pt-2 px-4"> | |
{embeddedLinks.map((link, index) => ( | |
<Link | |
href={link} | |
target="_blank" | |
className="text-sm flex items-start gap-2" | |
key={index} | |
> | |
<span>{index + 1}.</span> | |
<span className="underline">{link}</span> | |
</Link> | |
))} | |
</DropdownMenuContent> | |
</DropdownMenu> | |
) : null} |
components/view/nav.tsx
Outdated
<DropdownMenu> | ||
<DropdownMenuTrigger> | ||
<div className="text-sm font-semibold mr-6"> | ||
Embedded Links |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Embedded Links | |
Links on Page |
components/view/nav.tsx
Outdated
<Link | ||
href={link} | ||
target="_blank" | ||
className="text-sm flex items-start gap-2" | ||
key={index} | ||
> | ||
<span>{index + 1}.</span> | ||
<span className="underline">{link}</span> | ||
</Link> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can just use a <DropdownMenuItem>
from shadcn/ui and the links will be styled properly.
Please remove the numbering <span>{index + 1}.</span>
, I don't think that's needed
components/view/nav.tsx
Outdated
<div className="text-sm font-semibold mr-6"> | ||
Embedded Links | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can wrap this in a <Button>
and then it will be styled well.
components/view/nav.tsx
Outdated
DropdownMenuContent, | ||
DropdownMenuTrigger, | ||
} from "@/components/ui/dropdown-menu"; | ||
import DropDown from "../web/alternatives/dropdownproto"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is probably not needed here
@mfts suggested fixes done ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
fixes #253
@mfts the method used to implement this is very simple, will find a good work around this later ; )
for now, I think it's good.
Ready for Review