morajabi / styled-media-query

💅💍 Better media queries for styled-component
MIT License
1.32k stars 53 forks source link

fix: Handle custom sizes in lt/gt/between #21

Closed franky47 closed 3 years ago

franky47 commented 4 years ago

As discussed in #3 by @budt0m : https://github.com/morajabi/styled-media-query/issues/3#issuecomment-564049065

budt0m commented 4 years ago

Looks good to me.

raulfdm commented 4 years ago

23

raulfdm commented 4 years ago

The downside about this approach is we lost the nice autocompletion with the breaking points.

Doing that breakingPoint will expect to be string instead mobile | tablet | desktop | string

budt0m commented 4 years ago

@raulfdm As I wrote in a comment here, I still get autocompletion

raulfdm commented 4 years ago

@budt0m that's weird, for VSCODE it doesn't pickup :/

Screenshot 2020-01-24 at 13 28 47

raulfdm commented 4 years ago

And BTW, if you check on TypeScript playground, it also doesn't autocomplete:

https://www.typescriptlang.org/play/index.html#code/FASwdgLgpgTgZgQwMZQAQBEqIK4BsIBCMUCA1gA4D24EAzqgN7CouoAW2A5lAFyq0QY4TgG5mrXAhjc+AoWFHiWAWygATENmWzBwsa37KEuXDvmKWAX2A2asRClQBZdSAQBxKGFgIIlGAA8RCQU1JC0ADSoACpsUKoAfIziuFC0tLEIYHwBAAowlOS0CQAUSqwA9ABUqAByAPKoAKq1AJL1tagA6q3RABKoAMrRAEqtte6oVRXlLABGxGRUNHykUACelHCowUthdBHlAJSoALxJWev6qJyL0DCZ2ah5BUWls6jVzW0d3b0DwzGEymMwM80WoRWqDWm22u0h4VQAB9+LoFIcDCdzqhLtd5lAIAB3KBeHL5QrFMpg1BwEACVYbLY7CHLcIYsG0KBIShgNQM2HMkKsg7HM4XMBXYDWYBqLmSYioblgASoVQaBB8FzqzzeGC+fwBTA4fDw4WRHEShJiGxqtwAOlS6UeJSOwFtCDttxI92dRyAA

budt0m commented 4 years ago

@raulfdm Yep, you're right. I guess WebStorm does some extra magic behind the scenes. That being said, I still think the typings should be updated, as they're currently incorrect

larissaiurk commented 3 years ago

Hello!

Would it be possible to do a new release accepting custom sizes? Or already released and I didn't see...?

raulfdm commented 3 years ago

Closed by https://github.com/morajabi/styled-media-query/pull/26