haeli05
haeli05

Reputation: 21

Problems Importing Bootstrap Studio Renders into React with reactstrap

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(&quot;assets/img/logoalt copy.png&quot;);padding-right:5px;background-size:contain;margin-right:0;padding-left:5px;background-position:center;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</a>

into react components while preserving the css rules?

Upvotes: 0

Views: 691

Answers (1)

James
James

Reputation: 1293

JSX requires that you className= not class=

See: https://reactjs.org/docs/faq-styling.html

Upvotes: 1

Related Questions