Skip to content

Latest commit

 

History

History
28 lines (24 loc) · 637 Bytes

README.md

File metadata and controls

28 lines (24 loc) · 637 Bytes

apply-style-json-defined

This function applies styles dynamically with auto merge

Call function with styles passed as a Json

You can pass all css properties

Example :

applyStyles({
  "myclass" : {
    "color" : "rgb(254, 254, 254)",
    "font-size": "12px"
},
  "myotherclass" : {
    "background-color" : "rgb(56, 60, 66)",
    "border-color" : "rgba(0, 0, 0, 0.51)"
 },
  "myotherclass:hover" : {
    "background-color" : "blue"
 },
  "myotherclass:active" : {
    "background-color" : "red"
 }
})

All tags with these classes (myclass & myotherclass) will be impacted.