react-smart-link

1.0.6 • Public • Published

react-smart-link

react-router-dom Link support for external URLs.

Install

$ npm install --save react-smart-link

Usage

import ReactSmartLink from "react-smart-link";

// Will produce <a href="https://....">External link</a>
<ReactSmartLink to="https://....">External link</ReactSmartLink>

// Will produce <Link to="/react/router/route">Internal link</Link>
<ReactSmartLink to="/react/router/route">Internal link</ReactSmartLink>

// Will produce <button type="button">Button name</button>
<ReactSmartLink>Button name</ReactSmartLink>

// Will produce <button type="submit">Submit button</button>
<ReactSmartLink type="submit">Submit button</ReactSmartLink>

Dependencies (0)

    Dev Dependencies (1)

    Package Sidebar

    Install

    npm i react-smart-link

    Weekly Downloads

    0

    Version

    1.0.6

    License

    MIT

    Unpacked Size

    6.55 kB

    Total Files

    4

    Last publish

    Collaborators

    • giedriusv