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

switch to matchmedia module for client/server abstraction #11

Merged
merged 5 commits into from
Feb 27, 2015

Conversation

phated
Copy link
Contributor

@phated phated commented Feb 27, 2015

I was able to keep this PR much smaller than anticipated due to the matchmedia modules abstraction for client/server. It just takes an optional 2nd parameter, values, that it uses if window.matchMedia can't be accessed.


var defaultTypes = {
component: React.PropTypes.func,
query: React.PropTypes.string
query: React.PropTypes.string,
values: React.PropTypes.object
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you define the shape of this object with React.PropTypes.shape? also need docs on this new prop

@yocontra
Copy link
Owner

lgtm just need more info on the new prop then 👍

@phated
Copy link
Contributor Author

phated commented Feb 27, 2015

I think I got everything. Diff is large because I rebuilt the samples to add the static sample.

@phated
Copy link
Contributor Author

phated commented Feb 27, 2015

I removed the rebuilding of dists

```js
var mq = require('react-responsive');
```jsx
var Mq = require('react-responsive');
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MQ? MediaQuery?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dig MediaQuery, will update

@phated
Copy link
Contributor Author

phated commented Feb 27, 2015

Updated

yocontra pushed a commit that referenced this pull request Feb 27, 2015
switch to matchmedia module for client/server abstraction
@yocontra yocontra merged commit 9795c01 into yocontra:master Feb 27, 2015
@yocontra
Copy link
Owner

Thanks! Owe you a 🍻

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

Successfully merging this pull request may close these issues.

None yet

2 participants