react-scroll-shadow icon indicating copy to clipboard operation
react-scroll-shadow copied to clipboard

Support gradient shadow

Open montanaflynn opened this issue 6 years ago • 1 comments

Replacing a solid background with background: linear-gradient(white, #cccccc);

screen shot 2018-06-25 at 10 54 08 pm

montanaflynn avatar Jun 25 '18 15:06 montanaflynn

@montanaflynn you can just replace the top and bottoms colors with whatever background you would like:

          <ScrollShadow
            shadowSize={8}
            topShadowColors={{
              inactive: 'white',
              active:
                'radial-gradient(at top, rgba(0, 0, 0, 0.2), transparent 70%)',
            }}
            bottomShadowColors={{
              inactive: 'white',
              active:
                'radial-gradient(at bottom, rgba(0, 0, 0, 0.2), transparent 70%)',
            }}
          >
            {content}
          </ScrollShadow>

danielmahon avatar Sep 14 '18 16:09 danielmahon