Tweet React Component
Tweet React component. See a live demo.
npm i fake-tweet
The following snippet is an example of use of the fake-tweet
component:
import React from "react";
import FakeTweet from "fake-tweet";
function App() {
const config = {
user: {
nickname: "twitter",
name: "Twitter",
avatar: "avatar.png",
verified: true,
locked: false
},
display: "default",
text: "This is a fake tweet",
image: "",
date: "3:32 PM · Feb 14, 1997",
app: "Twitter for iPhone",
retweets: 32000,
quotedTweets: 100,
likes: 12700
};
return (
<div className="App">
<FakeTweet config={config} />
</div>
);
}
export default App;
You also need to pass a config
object to the component with the following properties:
default
, dim
or lightsout
)