Files
vercel__workflow/packages/web/app/components/ui/docs-link.tsx
Nathan Rajlich 32ac8e73fd Fix Biome lint violations and add Biome CI check (#3222)
* Fix Biome lint violations and add Biome CI check

Biome was not configured to respect .gitignore, so ~92% of the 13,355
reported diagnostics came from gitignored build artifacts. Enable VCS
integration (useIgnoreFile), apply safe auto-fixes across the repo, fix
the remaining mechanical errors by hand, downgrade judgment-call a11y /
dangerouslySetInnerHTML rules to warnings, and add a 'biome ci' job to
the Lint workflow so violations block PRs going forward.

* Use an empty changeset (no behavior change, no release needed)
2026-07-30 22:32:12 +00:00

45 lines
1.1 KiB
TypeScript

import * as React from 'react';
import { Link } from 'react-router';
import { cn } from '~/lib/utils';
export interface DocsLinkProps
extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
href: string;
}
/**
* A styled link component for documentation links.
* Automatically prepends the docs base URL if a relative path is provided.
*/
const DocsLink = React.forwardRef<HTMLAnchorElement, DocsLinkProps>(
({ className, href, children, ...props }, ref) => {
// Convert relative paths to full docs URLs
const fullHref = href.startsWith('http')
? href
: `https://workflow-sdk.dev/docs/${href.replace(/^\//, '')}`;
return (
<Link
href={fullHref}
className={cn(
'font-medium underline underline-offset-4 transition-colors',
className
)}
style={{
color: 'var(--ds-blue-600)',
}}
target="_blank"
rel="noopener noreferrer"
ref={ref}
{...props}
>
{children}
</Link>
);
}
);
DocsLink.displayName = 'DocsLink';
export { DocsLink };