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

[Suggestion]Make the doc more detailed #30

Open
NE-SmallTown opened this issue May 13, 2017 · 3 comments
Open

[Suggestion]Make the doc more detailed #30

NE-SmallTown opened this issue May 13, 2017 · 3 comments

Comments

@NE-SmallTown
Copy link

NE-SmallTown commented May 13, 2017

Thanks for this repo,it is really very very nice!But there maybe are a few things to make it better.

1.just as #23 says,we need to remove the unknown props in html tag because react doesn't allow us to do this,if we need,we can add the data- prefix or wait the react 16 release(it will allow to you to make custom prop on html tag).

2.the setup says:

// (optional)
// We can wrap any component using the factory methods
// Assume that `MyClass` is a React class we created
SparkScroll['MyClass'] = sparkScrollFactory(MyClass);

<SparkScroll.MyClass
   myClassProperty="some value that MyClass requires"
     timeline={{
     'topTop+100': {width: '0%', backgroundColor: '#5c832f'},
     'topTop+250': {width: ['100%', 'easeOutQuart'], backgroundColor: '#382513'}
}} />

but there is no demo for it and the usage above probably is wrong because it will cause sparkAnimator.update is not a function error because we don't set the animator in the options by check the src code

3.Finally,maybe we could also add something about SparkProxy and tell user we could use negative number of the timeline option's property in the doc.

@gilbox Thanks again for creating this repo! 👍

@NE-SmallTown NE-SmallTown changed the title [Suggestion]Make the doc more detail [Suggestion]Make the doc more detailed May 13, 2017
@gilbox
Copy link
Owner

gilbox commented May 18, 2017

all great suggestions @NE-SmallTown, PRs for any of the issues you mentioned would be appreciated. Re: 2, in retrospect, the suggestion of adding keys to the SparkScroll object was probably a bad idea.

@jshrssll
Copy link

@NE-SmallTown how did you fix the sparkAnimator.update is not a function problem?

@NE-SmallTown
Copy link
Author

@splurtcake Sorry, I forget the details, it seems like I use SparkScroll.div rather than SparkScroll.MyClass(because it doesn't support, but maybe I need dig into this) solve this.

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

No branches or pull requests

3 participants