1.0.2 • Published 2 years ago

fake-tweet v1.0.2

Weekly downloads
5
License
MIT
Repository
-
Last release
2 years ago

Fake Tweet

Tweet React component. See a live demo.

Example

Fake tweet example

Installation

npm i fake-tweet

Usage

To use the fake-tweet component in your app after having installed it, import the component and its stylesheet:

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:

  • User:
    • Nickname: Twitter @username
    • Name
    • Avatar: Twitter avatar URL
    • Verified: Set to true to include the verified icon
    • Locked: Set to true to include the private account icon
  • Display: Twitter theme (default, dim or lightsout)
  • Text: The text the tweet will display
  • Image (optional): You can include an image to the tweet. Can be either a single URL string or an array of up to four URL strings for multiple images.
  • Date: A string that represents a date
  • App: For example, "Twitter for iPhone"
  • Retweets: Number of retweets
  • Quoted Tweets: Number of quoted tweets
  • Likes: Number of likes
1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.1.17

2 years ago

0.1.16

3 years ago

0.1.14

4 years ago

0.1.15

4 years ago

0.1.13

4 years ago

0.1.12

4 years ago

0.1.11

4 years ago

0.1.10

4 years ago

0.1.9

4 years ago

0.1.8

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago