@greenlabs/rescript-react-linkify

1.0.0 • Public • Published

rescript-react-linkify

Install

npm i @greenlabs/rescript-react-linkify
or
yarn add @greenlabs/rescript-react-linkify
"bs-dependencies": [
  "@greenlabs/rescript-react-linkify"
]

Usage

@react.component
let make = () => {
<Linkify
  componentDecorator={(decoratedHref, decoratedText, index) => {
    <a
      target="_blank"
      key={decoratedHref ++ decoratedText ++ Int.toString(index)}
      href={decoratedHref}>
      {decoratedText->React.string}
    </a>
  }}>
  {"Contents"->React.string}
</Linkify>
}

Readme

Keywords

Package Sidebar

Install

npm i @greenlabs/rescript-react-linkify

Weekly Downloads

9

Version

1.0.0

License

MIT

Unpacked Size

2.09 kB

Total Files

5

Last publish

Collaborators

  • namenu
  • moondaddi
  • kimchhickey