1

I am using classNames for styling my component in react, but if i use some components like react-select then how to import styles react-select/dist/react-select.min.css and use it inside my component.

import React, { Component } from 'react';
import classNames from 'classnames/bind';
import styles from './styles.css';
import Select from 'react-select';
import 'react-select/dist/react-select.min.css';
const cx = classNames.bind(styles);

class TestComponent extends Component {
  render(){
    return (
      <div>
        <label className={cx('select-label')}>Choose options</label>
          <Select options={[]}/>
      </div>
    )
  }
}

export default TestComponent;

Here is my piece of code, my react-select is not styled. How to achieve that?

Pardeep Dhingra
  • 3,916
  • 7
  • 30
  • 56
Vikramaditya
  • 5,444
  • 6
  • 34
  • 45

0 Answers0