prateekbh / preact-material-components

preact wrapper for "Material Components for the web"
https://material.preactjs.com
MIT License
553 stars 81 forks source link

FormField radio buttons and checkboxes responsive ? #1236

Closed gopalramadugu closed 5 years ago

gopalramadugu commented 5 years ago

I created a page with Layoutgrid with radio buttons and checkboxes. When I try the responsive mode in Chrome. The page does align the content in a responsive layout. Looks like the issue is with FormField. I want to align the content in horizontal layout when viewed in full page and vertical layout when the view switches to responsive. Below is the sandbox if you open the page in a new window and try responsive you will understand. Is this a bug ?

https://codesandbox.io/s/0o7283363n

cromefire commented 5 years ago

I think your error is that you use htmlFor instead of for and div and Typography in the label could also break it

gopalramadugu commented 5 years ago

@cromefire I replaced htmlFor with for and removed div and typography. It is still breaking.

https://codesandbox.io/s/8yym72kj40

gopalramadugu commented 5 years ago

Ok found the issue. I was using ForField for all radios at once. you should use one for each element.

cromefire commented 5 years ago

Sorry I didn't mess around with that in the last time