Update add-inline-style-in-react (#35739)

- Add my solution in the hint.
This commit is contained in:
Dipto Karmakar
2019-05-19 10:02:46 +06:00
committed by Tom
parent f69768e2ae
commit 3dc8f10ae8

View File

@ -6,11 +6,17 @@ You can declare a component style passing the object directly as a prop 'style'.
### Spoiler
```jsx
const styles = {
color: 'purple',
fontSize: 40,
border: "2px solid purple",
};
class Colorful extends React.Component {
render() {
// change code below this line
return (
<div style={{color: "yellow", fontSize: 24}}>Style Me!</div>
<div style={styles}>Style Me!</div>
);
// change code above this line
}