Make view 80% width of parent in React Native

后端 未结 10 2115
孤城傲影
孤城傲影 2020-12-12 16:49

I\'m creating a form in React Native and would like to make my TextInputs 80% of the screen width.

With HTML and ordinary CSS, this would be straightfor

10条回答
  •  青春惊慌失措
    2020-12-12 17:23

    That should fit your needs:

    var yourComponent = React.createClass({
        render: function () {
            return (
                
                    
                        
                         // spacer
                    
                
            );
        }
    });
    

提交回复
热议问题