Btn
A functional component for logically rendering the appropriate actionable elements: <RouterLink>
, <a>
, or <button>
. At first glance, this may not be a particularly helpful component, but it really simplifies list rendering.
Features:
- Renders a
<button>
by default. - Renders a
<RouterLink>
when provided ato
prop. - Renders an
<a>
link when provided ahref
prop. - Renders an
<form>
link when provided anaction
anddata
prop. - Adds
type="button"
to<button>
elements. - Adds
rel="noopener"
to links withtarget="blank"