Closed HriBB closed 8 years ago
I also use react-storybook
for testing and will use this repo as a playground to figure out how to style the storybook
interface.
hey @HriBB, great work! I haven't had the time to really take a look at it yet, but if you want to add a mention to your component in the readme and/or website, feel free to send a PR ;)
@tleunen sure why not. First I would like to get some feedback on this, don't want to promote something that does not work as expected.
hey @HriBB, this is very interesting. From a first use, this doesn't match the exact MD guidelines but I guess it wasn't your objective.
For the multiselect, I believe using the new "Chip" component would be best, also having them inside the input instead of outside.
Very good job.
Closing because it's not an issue initially ;)
From a first use, this doesn't match the exact MD guidelines but I guess it wasn't your objective.
Exactly. It's easy to override the styles though, just put a negative margin to mdl-selectfield mdl-menu__container
. Maybe I will add followSpec
prop for that. Also I am thinking about creating a new AutoCompleteField
component for this.
For the multiselect, I believe using the new "Chip" component would be best, also having them inside the input instead of outside.
I will definitely use the new Chip
component, but rendering them inside the input
is not so easy, it does not allow children. I will have to position Chips absolutely, but then comes a world of problems. Any ideas?
Yep I agree :/
Maybe you would need to build something custom, just for the chips. Something like this demo: https://material.angularjs.org/latest/demo/chips
Ohh maybe it's not so hard. Simply render an input field after all the chips. Thanks for the link ;)
https://hribb.github.io/react-mdl-selectfield/
I created a simple
SelectField
,MultiSelectField
andOption
components for use withreact-mdl
.Internally they use
Textfield
,Menu
,MenuItem
andIcon
from thereact-mdl
package. You will also need Material Icons for the dropdown arrow.This is my first ever node package, so there could be problems with. Feedback welcome ;)
@tleunen let me know what you think about this. I would really like to know how to improve it.