UNPKG

775 BTypeScriptView Raw
1import React from 'react';
2import { BsPrefixProps, BsPrefixRefForwardingComponent } from './helpers';
3export interface SafeAnchorProps extends React.HTMLAttributes<HTMLElement>, BsPrefixProps {
4 href?: string;
5 disabled?: boolean;
6 tabIndex?: number;
7}
8declare type SafeAnchor = BsPrefixRefForwardingComponent<'a', SafeAnchorProps>;
9/**
10 * There are situations due to browser quirks or Bootstrap CSS where
11 * an anchor tag is needed, when semantically a button tag is the
12 * better choice. SafeAnchor ensures that when an anchor is used like a
13 * button its accessible. It also emulates input `disabled` behavior for
14 * links, which is usually desirable for Buttons, NavItems, DropdownItems, etc.
15 */
16declare const SafeAnchor: SafeAnchor;
17export default SafeAnchor;