react-data-grid icon indicating copy to clipboard operation
react-data-grid copied to clipboard

add default CSS to README

Open txm opened this issue 10 years ago • 7 comments

Could you add this line to your README?

require('react-data-grid/themes/react-data-grid.css')

Would have saved me an hour ;)

txm avatar Jan 26 '16 21:01 txm

+1

willbreitkreutz avatar Apr 28 '16 16:04 willbreitkreutz

Where would i put this 'require' in my app?
new person here...

mnesler avatar Sep 06 '16 16:09 mnesler

hey @mnesler -- where exactly depends on your specific setup.. Are you using Webpack? 🙂

jpdriver avatar Sep 06 '16 17:09 jpdriver

I am not.

At this point, i think I should be...

I installed the 'create-react-app' package, then this one.

Seems there is no Webpack in the 'create-react-app' package.

edit: my dev console says i am using webpack.

mnesler avatar Sep 06 '16 17:09 mnesler

Ahh awesome! create react app does use Webpack, but "under the hood"..

If you want to keep using it, you need to run npm eject first. That will expose Webpack and all the other underlying tech it uses.

BUT after that, you'll need to add a special Loader to get Webpack to handle CSS files..

Sadly the truth is there's a bunch of ways of doing this, and Dan (the guy who created create-react-app) didn't want to force the community to adopt a specific one..

Maybe it would be helpful if Adazzle included an end-to-end guide on starting React Data Grid + create-react-app from scratch?

jpdriver avatar Sep 06 '16 17:09 jpdriver

This is good news, and explains a bit of my own confusion.

+1 for some style documentation from Adazzle

@jpdriver thank you for your time.

mnesler avatar Sep 06 '16 17:09 mnesler

This is no longer necessary in v2, All the styles are shifted with the grid.

Cheers.

diogofcunha avatar Jan 25 '17 11:01 diogofcunha