techniq / mui-downshift

Thin layer over paypal's downshift to use Material UI visual components
https://techniq.github.io/mui-downshift/
MIT License
92 stars 24 forks source link

Question about implementation #65

Closed neocybereth closed 5 years ago

neocybereth commented 5 years ago

Do I need to use this, instead of regular Downshift, in order to get regular floating labels implemented properly?

techniq commented 5 years ago

Hmm.. I'm not 100% sure if I'm following your question, but this is the code that controls whether an input label should shrink or not.

https://github.com/techniq/mui-downshift/blob/72e89fcd841aee62e440ecfece5aa9c1e2b82fb4/src/Input.js#L45

neocybereth commented 5 years ago

Yeah, so basically wondering if I need to use Mui downshift in order to be able to integrate floating labels into my downshift input or if that can be achieved with regular downshift? EDIT - does that make sense @techniq ?

techniq commented 5 years ago

You should be able to accomplish this yourself using just material-ui and downshift. This library just helps to marry the two together. For example, I'm using mui's FormControl, Input and InputLabel instead of just TextField for more control (which is mentioned below on their docs).

So in short, you don't have to use my mui-downshift library, but it provides better support for more use cases you might run into if you implement the two yourself (see the stories).