Skip to content

Commit

Permalink
Merge pull request #9 from dbudwin/ReadmeUpdates
Browse files Browse the repository at this point in the history
Added CodeSandbox example
  • Loading branch information
dbudwin authored Dec 30, 2020
2 parents 51b8418 + ce67220 commit dc04a46
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ Using `react-secure-link` for outbound links prevents the new tab from having ac
2. Import the package: `import { SecureLink } from "react-secure-link";`
3. Use the following for links you want to open in a new tab: `<SecureLink href="https://www.npmjs.com/package/react-secure-link">react-secure-link on NPM</SecureLink>`

## CodeSandbox Examples

There are several examples of the various ways to use this package on CodeSandbox.

[react-secure-link CodeSandbox Examples](https://codesandbox.io/s/react-seucre-link-examples-wzcwf)

### API

`SecureLink` can be used to make text, images, or other children components clickable. In addition, standard `a` element attributes can be pass in as props (i.e. `href`, `className`, `id`, `role`, `style`).
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-secure-link",
"version": "3.0.0",
"version": "3.0.1",
"description": "A TypeScript compatible React component to avoid security exploits when opening a link in a new tab.",
"keywords": [
"react",
Expand Down

0 comments on commit dc04a46

Please sign in to comment.