UNPKG

794 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 role?: string;
7 tabIndex?: number;
8}
9declare type SafeAnchor = BsPrefixRefForwardingComponent<'a', SafeAnchorProps>;
10/**
11 * There are situations due to browser quirks or Bootstrap CSS where
12 * an anchor tag is needed, when semantically a button tag is the
13 * better choice. SafeAnchor ensures that when an anchor is used like a
14 * button its accessible. It also emulates input `disabled` behavior for
15 * links, which is usually desirable for Buttons, NavItems, DropdownItems, etc.
16 */
17declare const SafeAnchor: SafeAnchor;
18export default SafeAnchor;