React Anchor component. It handles stopPropagation() and preventDefault() when disabling an anchor tag.
Demo: https://trendmicro-frontend.github.io/react-anchor
- Install the latest version of react and react-anchor:
npm install --save react @trendmicro/react-anchor
- Import react-anchor with @trendmicro scope:
import Anchor from '@trendmicro/react-anchor';
<Anchor
className="btn btn-default"
href="https://github.com"
>
<i className="fa fa-github fa-fw" />
GitHub
</Anchor>
Name | Type | Default | Description |
---|---|---|---|
href | String | ||
onClick | Function(event) | ||
disabled | Boolean | ||
role | String | ||
tabIndex | Number|String | ||
componentClass | Node|String | 'a' |
MIT