cf-component-link
Cloudflare Link Component
Installation
Installation with yarn is recommended
$ yarn add cf-component-link
Usage
import React from 'react';import Link from 'cf-component-link'; Component { ; thisstate = isActive: false ; } { console; } { this; } { return <div> <p> Create a <code>Link</code> with a <code>to</code> prop: </p> <Link ="/">Link to /</Link> <p> Alternatively you can pass an <code>onClick</code> handler: </p> <Link =>Link to something</Link> <p>`Note: This will give it a role="button"`</p> <p> All additional props will be added to the <code>Link</code> element: </p> <Link ="/foo">Link to /foo</Link> <p>You can create an expandable link by giving it an expandable prop</p> <Link = = > Link to /foo </Link> </div> ; } ;