815 B
815 B
All link
<Linkify text="https://somewhere.com" />
Starting and ending with link
<Linkify text="https://somewhere.com Yes? No? https://anotherlink.com" />
With a link in the middle
<Linkify text="Before. https://somewhere.com After." />
No link
<Linkify text="Plain text" />
Should not render as link
<Linkify text="smailto:someone@somewhere.com - ftp://something.com - //local/share - \\local\share" />
Should render as link
<Linkify text="github.com - https://blah.com" />
Providing custom non-link render function
const renderNonLink = ({ text, key }) => (
<span key={key}>This is my custom non-link content!</span>
);
<Linkify text="Before github.com After" renderNonLink={renderNonLink} />;