zksailor534/react-adminlte-dash

no-print

dchan14 opened this issue · 2 comments

is there an easy way to target your dashboard to make classnames include no-print so that just the content-wrapper is printable?

There isn't currently, but that doesn't look like it would be too difficult. Probably just a top-level option that gets passed (through mostly pre-existing) mechanisms to all the lower level components except the content.
Unfortunately, I don't have time right now to do it myself. If you want to create a pull request and try it yourself, I'll help as I can and merge it when you're done.

i tried looking at the code but i think it's a little over my head right now still learning but i used this in my css for a quick fix and in the div right above {children} i put className="printarea".

@media print { body * { visibility: hidden; } .printarea * { visibility: visible; overflow:visible; left: 0; top: 0; } }

thanks for the quick response