reactjs - Trouble centering and reducing the size of the ripple effect for material-ui RadioButton -


when reducing size of radiobutton in material-ui components react, ripple effect becomes off-center , large. cannot seem find style props control it. here working code.

const { muithemeprovider, getmuitheme, radiobuttongroup, radiobutton } = materialui;  class radiodemo extends react.component {    render() {     return (       <radiobuttongroup         name="orientation"         style={{margintop: 20, marginbottom: 20, display: 'flex' }}         required={true}         validationerror="this field required."       >         <radiobutton value="1" label="button1"            style={styles.radiobutton.style}           labelstyle={styles.radiobutton.label}           iconstyle={styles.radiobutton.icon}           inputstyle={styles.radiobutton.input}         />          <radiobutton value="2" label="button2"           style={styles.radiobutton.style}           labelstyle={styles.radiobutton.label}           iconstyle={styles.radiobutton.icon}           inputstyle={styles.radiobutton.input}         />       </radiobuttongroup>     );   }  }  const styles = {   radiobutton: {         style: {             width: "140px"         },         label: {             width: "100px",             fontsize: "14px",             padding: "0px",             textalign: "left"         },         icon: {             heigh: "14px",             width: "14px",             padding: "0px",             marginright: "8px"         },         input: {             width: "100px"         }    } };     const app = () => (   <muithemeprovider muitheme={getmuitheme()}>     <radiodemo />   </muithemeprovider> );  reactdom.render(   <app />,   document.getelementbyid('container') ); 

link jsfiddle: http://jsfiddle.net/brentjm/bppxsopw/7/

animation-offcentered-radiobutton

additional details: npm version 4.2.0

some package.json dependencies:

"react": "^15.2", "react-dom": "^15.0.1", "material-ui": "0.18.3", "babel-preset-react": "^6.5.0" 

devdependencies

"webpack": "^1.13.1" 

i'm not using react-toolbox.


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -