Answers for "function with style in react"

27

inline style react

// You are actuallty better off using style props
// But you can do it, you have to double brace
// and camel-case the css properties
render() {
	return (
    	<div style={{paddingTop: '2em'}}>
      		<p>Eh up, me duck!</p>
      	</div>
    )
}
Posted by: Guest on March-14-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language