Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add options for container and cssText #70

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yofreke
Copy link

@yofreke yofreke commented Sep 15, 2016

I am using stats.js in a react project. This means I do not want stats creating dom nodes. This PR lets a user configure the stats style string, as well as the container element.

React example usage:

CoolComponent extends React.Component {
  componentDidMount () {
    this._stats = new Stats({ container: this.refs.statsContainer, cssText: '' });
  }

  render () {
    return (
      <div class='cool-component'>
        <div ref='statsContainer' />
      </div>
    );
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants