@dhaiwat10/react-link-preview
Advanced tools
Comparing version 1.1.2 to 1.1.3
{ | ||
"name": "@dhaiwat10/react-link-preview", | ||
"license": "MIT", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"private": false, | ||
"description": "React library to preview links.", | ||
"author": "Dhaiwat Pandya", | ||
"keywords": [ | ||
"react", | ||
"react-link-preview", | ||
"link", | ||
"preview", | ||
"card" | ||
], | ||
"homepage": "https://github.com/dhaiwat10/react-link-preview", | ||
@@ -9,0 +16,0 @@ "bugs": { |
# React Link Preview | ||
A React component that renders beautiful link previews. | ||
@@ -14,2 +15,3 @@ | ||
Import and render the preview: | ||
```js | ||
@@ -19,9 +21,8 @@ import { LinkPreview } from '@dhaiwat10/react-link-preview'; | ||
const Home = () => { | ||
return ( | ||
<LinkPreview url='https://www.youtube.com/watch?v=4pNryX84oWs' /> | ||
); | ||
} | ||
return <LinkPreview url='https://www.youtube.com/watch?v=4pNryX84oWs' />; | ||
}; | ||
``` | ||
## API (Available props) | ||
You can pass the following props to the `LinkPreview` component. | ||
@@ -37,10 +38,10 @@ | ||
`descriptionLength`: number | ||
`descriptionLength?`: number | ||
`borderRadius`: string or number | ||
`borderRadius?`: string or number | ||
`imageHeight`: string or number | ||
`imageHeight?`: string or number | ||
`textAlign`: *left*, *right* or *center* | ||
`textAlign?`: _left_, _right_ or _center_ | ||
Props marked with **?** are **optional**. |
20904
45