Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Add additional css class name in react app

You can pass more classes into className using template literal strings. Here's an example passing in the my-2 and mr-4 you wanted to add:

import React from "react";

import logoimg from "../../assets/images/logo.svg";
import classes from "./Logo.module.scss";

const logo = (props) => {
  return (
    <div className={`${classes.Logo} my-2 mr-4`}>
      <a href="/">
       <img src={logoimg} />
        <p>Resume Builder</p>
      </a>
    </div>
  );
};

export default logo;
 
PREVIOUS NEXT
Tagged: #Add #additional #css #class #react #app
ADD COMMENT
Topic
Name
7+7 =