1

I'm using a spreadsheet package called React-Datasheet installed with npm in my react.js project. The following instructions are found in the GitHub:

import ReactDataSheet from 'react-datasheet';
// Be sure to include styles at some point, probably during your bootstrapping
import 'react-datasheet/lib/react-datasheet.css'; 

When I compile the code the styling file does not compile with it. What is the method used to add the react-datasheet.css file?

The content currently renders like this:

enter image description here

How do I import the css file to result in a render that looks like this:

react

2
  • try adding style-loader npmjs.com/package/style-loader Commented May 29, 2020 at 13:36
  • I've tried adding style loader and css loader to no avail. Commented May 29, 2020 at 15:10

1 Answer 1

1

Just add this css in your index as what I found is it has further css https://github.com/nadbm/react-datasheet/blob/master/docs/src/index.css

and add <div className={"sheet-container"}> class or div before rendering ReactDataSheet

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.