Thursday, March 5, 2020

Changing Styles Dynamically in ReactJS


import React, { Component } from "react";
class DynamicStyleSheet extends Component {
    render() {
        const Stylesheet = {
            style: {
backgroundColor: "rgb(80, 157, 227)",
color: "white",
height: "150px",
fontSize: "11px"
}
        };

        return <span style ={Stylesheet.style}> Changing Styles Dynamically in ReactJS   </span>;
    }
}

No comments:

Post a Comment

Popular Posts