-1
<div class="form-group" className=''>
    <input type="password" class="form-control" className={loginStyle.passwordDiv} 
           id="exampleInputPassword1" placeholder="Password"></input> 
</div>

I want to pass class form-control and also need to use loginStyle which I imported from another CSS file to provide styling to this input.

1 Answer 1

0

You will need to use both class names in className like this in your case

<div className="form-group">
  <input 
    type="password"
    className={`${loginStyle.passwordDiv} form-control`} 
    id="exampleInputPassword1" 
    placeholder="Password" 
  /> 
</div>

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.