mannynotfound / react-tweet

React.js component for rendering tweets as they are presented on Twitter.com
67 stars 43 forks source link

Inline styles not working as expected #9

Closed mini-eggs closed 6 years ago

mini-eggs commented 8 years ago

Ex: font-family: "font-size:14px;line-height:18px;list-style-image:none;list-style-position:outisde;list-style-type:none;padding:9px 12px;position:relative;text-align:start;

http://i.imgur.com/qJDoNgP.jpg http://i.imgur.com/8pzMghH.png

import * as React from "react"
import * as Tweet from 'react-tweet'
import styles from './styles'
import {getData} from '../fetch'

export default class extends React.Component<any, any> {
    constructor(props: any) {
        super(props);
        this.state = {
            tweets:getData().twitter
        }
    }
    render() {
        return(
            <div style={styles.backgroundColorNine}>
                <div style={styles.background}>
                    <div style={styles.tweetContainer}>
                        {
                            this.state.tweets.map( (item:any, i:number) => {
                                return <div style={styles.tweet}>
                                    <Tweet data={item} />
                                </div>
                            })
                        }
                    </div>
                </div>
            </div>
        );
    }
}

Another thing, import Tweet from 'react-tweet' wasn't working, that's why the * is in there. May be a versioning diff? Node -v v6.5.0


  "dependencies": {
    "body-parser": "^1.15.2",
    "compression": "^1.6.2",
    "concurrently": "^2.1.0",
    "css-loader": "^0.23.1",
    "del": "^2.2.1",
    "express": "^4.14.0",
    "extract-text-webpack-plugin": "^1.0.1",
    "file-loader": "^0.9.0",
    "fs": "0.0.2",
    "html-minifier": "^3.0.3",
    "mysql": "^2.11.1",
    "node-sass": "^3.8.0",
    "nodemon": "^1.9.2",
    "react": "^15.1.0",
    "react-dom": "^15.1.0",
    "react-hot-loader": "^1.3.0",
    "react-router": "^2.4.1",
    "readline": "^1.3.0",
    "sass-loader": "^3.2.1",
    "style-loader": "^0.13.1",
    "ts-loader": "^0.8.2",
    "twitter-js-client": "0.0.5",
    "typescript": "^1.8.10",
    "typings": "^1.3.0",
    "webpack": "^1.13.1",
    "webpack-dev-server": "^1.14.1"
  }

Typescript keeps throwing Cannot find module 'react-tweet'.

mannynotfound commented 8 years ago

in your own dependencies I dont see react-tweet listed. You shouldnt have to * import React or React Tweet, so I think something in your environment is messed up.

If you can provide a runnable code example with the issues that would help a lot, not too sure whats wrong otherwise.