react-scroll-up-button icon indicating copy to clipboard operation
react-scroll-up-button copied to clipboard

Button shows up on print media

Open smallstepstoday opened this issue 7 years ago • 2 comments

Great library. Worked like a charm from the start. One small issue: the button shows up when the page is printed and the printout has more than one page.

image

It would be great if one didn't have to manually create CSS rules to exclude the button, and I am not sure how to do it given your use of the inline styles. (If I did, I would produce a PR.)

smallstepstoday avatar Nov 19 '18 19:11 smallstepstoday

This is a great idea, and I believe a necessity. Ill see about adding this in asap. Thank you

dirtyredz avatar Nov 19 '18 19:11 dirtyredz

My best advise on this is to simply add the container class to the print media query

@media print {
    .ScrollUpButton__Container {
        display: none important!;
    }
}

I would very much like this to be the default behavior but im reluctant to add a css file to the package just for this since currently all the default behavior styling is done via JS.

dirtyredz avatar Nov 26 '18 23:11 dirtyredz