mirror of
https://github.com/henrywhitaker3/Speedtest-Tracker.git
synced 2026-01-01 02:27:21 +01:00
21 lines
854 B
TypeScript
21 lines
854 B
TypeScript
import React from 'react';
|
|
import { BsPrefixProps, BsPrefixRefForwardingComponent } from './helpers';
|
|
export interface SafeAnchorProps extends BsPrefixProps {
|
|
href?: string;
|
|
onClick?: React.MouseEventHandler<this>;
|
|
onKeyDown?: React.KeyboardEventHandler<this>;
|
|
disabled?: boolean;
|
|
role?: string;
|
|
tabIndex?: number;
|
|
}
|
|
declare type SafeAnchor = BsPrefixRefForwardingComponent<'a', SafeAnchorProps>;
|
|
/**
|
|
* There are situations due to browser quirks or Bootstrap CSS where
|
|
* an anchor tag is needed, when semantically a button tag is the
|
|
* better choice. SafeAnchor ensures that when an anchor is used like a
|
|
* button its accessible. It also emulates input `disabled` behavior for
|
|
* links, which is usually desirable for Buttons, NavItems, DropdownItems, etc.
|
|
*/
|
|
declare const SafeAnchor: SafeAnchor;
|
|
export default SafeAnchor;
|