Reputation: 21
I'm working on a project where the designer is working with BootStrap studio, which exports to html with BootStrap 4, and I'm converting the exported file into React components with reactstrap.
I'm facing problems with class and styling rules, since the original file inherit from 7 different files. What's the best way to convert something like:
<div id="nav-bars">
<nav class="navbar navbar-light navbar-expand-md" id="top-nav" style="background-color:rgba(0,0,0,0.5);color:rgb(255,255,255);">
<div class="container-fluid"><a class="navbar-brand" href="#" style="background-image:url("assets/img/logoalt copy.png");padding-right:5px;background-size:contain;margin-right:0;padding-left:5px;background-position:center;"> </a>
into react components while preserving the css rules?
Upvotes: 0
Views: 691
Reputation: 1293
JSX requires that you className= not class=
See: https://reactjs.org/docs/faq-styling.html
Upvotes: 1