rn-tweet-embed
TypeScript icon, indicating that this package has built-in type declarations

0.1.5 • Public • Published

rn-tweet-embed

WebView based embedded Tweet for React Native

Installation

npm install rn-tweet-embed

or

yarn add rn-tweet-embed

Props

You must pass either tweetUrl or tweetId for this to work.

tweetUrl - Tweet URL (eg: https://twitter.com/reactnative/status/20)

Type Required
string No

tweetId - Tweet ID (eg: 20)

Type Required
string or number No

webViewProps - Props passed to the WebView

Type Required
WebView props No

embedParams - Tweet embed params

Type Required
Tweet embed params No

theme - Color theme

Type Required
'light' or 'dark' No

interceptPress - Optional callback to intercept widget press

Type Require
() => void No

Usage

import { Tweet } from "rn-tweet-embed";

const App = () => {
  const [theme, setTheme] = useState('light');

  const _onPress = () => {
    // handle widget press
  }

  return (
    <Tweet
      interceptPress={_onPress}
      theme={theme}
      tweetUrl="https://twitter.com/reactnative/status/20"
    />
  )
}

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Package Sidebar

Install

npm i rn-tweet-embed

Weekly Downloads

2

Version

0.1.5

License

MIT

Unpacked Size

113 kB

Total Files

30

Last publish

Collaborators

  • nalimonti