Skip to main content
Glama

Storyden

by Southclaws
Mozilla Public License 2.0
227
link-button.tsx1.48 kB
import { ArrowTopRightOnSquareIcon } from "@heroicons/react/24/outline"; import NextLink, { LinkProps as NextLinkProps } from "next/link"; import { PropsWithChildren } from "react"; import { css, cx } from "@/styled-system/css"; import { styled } from "@/styled-system/jsx"; import { ButtonVariantProps, button } from "@/styled-system/recipes"; import { JsxStyleProps } from "@/styled-system/types"; export type LinkProps = Partial<ButtonVariantProps> & NextLinkProps & JsxStyleProps; export type LinkButtonStyleProps = Partial<ButtonVariantProps> & JsxStyleProps; export function LinkButton({ children, href, ...props }: PropsWithChildren<LinkProps>) { // eslint-disable-next-line @typescript-eslint/no-unused-vars const [vp, stripped] = button.splitVariantProps(props); const cn = cx(button(vp), css(stripped)); const isExternal = !( href.toString().startsWith("/") || href.toString().startsWith("#") ); const target = isExternal ? "_blank" : undefined; return ( <NextLink className={cn} href={href} target={target} onClick={props.onClick} > <styled.span display="flex" // Supports overflowing children and text ellipsis maxW="full" alignItems="center" gap="1" > {children} </styled.span> {isExternal && ( <styled.span color="fg.subtle"> <ArrowTopRightOnSquareIcon /> </styled.span> )} </NextLink> ); }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Southclaws/storyden'

If you have feedback or need assistance with the MCP directory API, please join our Discord server