Answers for "best way to style react components"

2

use style in react

// use inline style in react
const myFunction = () => {
	return (
     <p style={{ fontSize: 24, margin: '0 auto', textAlign: 'center'}}>
       Hello world
    </p>
    );
}
Posted by: Guest on February-18-2022
1

jsx style styling

style={{color: "white",
        backgroundColor: '#f1356d',
        borderRadius: '8px'
       }}
Posted by: Guest on March-23-2022
0

Styling React Using CSS

//Use backgroundColor instead of background-color:
const Header = () => {
  return (
    <>
      <h1 style={{backgroundColor: "lightblue"}}>Hello Style!</h1>
      <p>Add a little style!</p>
    </>
  );
}
Posted by: Guest on May-24-2022

Code answers related to "best way to style react components"

Code answers related to "Javascript"

Browse Popular Code Answers by Language