Skip to main content
Glama

Storyden

by Southclaws
Mozilla Public License 2.0
227
icon-button.tsx1.22 kB
import { ark } from "@ark-ui/react/factory"; import type { ComponentProps } from "react"; import { forwardRef } from "react"; import { styled } from "@/styled-system/jsx"; import { ButtonVariantProps, button } from "@/styled-system/recipes"; import { Spinner } from "./Spinner"; export type StyledIconButtonProps = ComponentProps<typeof StyledIconButton>; export const StyledIconButton = styled(ark.button, button, { defaultProps: { px: "0" } as ButtonVariantProps, }); interface IconButtonLoadingProps { loading?: boolean; loadingText?: React.ReactNode; } export interface ButtonProps extends StyledIconButtonProps, IconButtonLoadingProps {} export const IconButton = forwardRef<HTMLButtonElement, ButtonProps>( (props, ref) => { const { loading, disabled, loadingText, children, ...rest } = props; const trulyDisabled = loading || disabled; return ( <StyledIconButton disabled={trulyDisabled} ref={ref} {...rest}> {loading && !loadingText ? ( <> <Spinner /> </> ) : loadingText ? ( loadingText ) : ( children )} </StyledIconButton> ); }, ); IconButton.displayName = "IconButton";

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