Inline Styles
The style prop takes an object with camelCase keys.
Example
function Box() {
return <div style={{ backgroundColor: "teal", padding: 8 }}>Hi</div>;
}Exercise
Style object.
style={ color: "red" }}
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.