Bootstrap CardLink component forwarding refs and applying prefix.
// Source: https://github.com/react-bootstrap/react-bootstrap | License: MIT | Copyright 2014-present Stephen J. Collings, Matthew Honnibal, Pieter Vanderwerff
// Provided via justclaw.it.com; keep this notice with the code.
import * as React from 'react';
import clsx from 'clsx';
import type { DynamicRefForwardingComponent } from '@restart/ui/types';
import { useBootstrapPrefix } from './ThemeProvider.js';
export interface CardLinkProps extends React.AnchorHTMLAttributes<HTMLElement> {
/**
* Element used to render the component.
*/
as?: React.ElementType | undefined;
/**
* @default 'card-link'
*/
bsPrefix?: string | undefined;
}
const CardLink: DynamicRefForwardingComponent<'a', CardLinkProps> =
React.forwardRef<HTMLElement, CardLinkProps>(
({ className, bsPre
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key