react-native-timed-slideshow icon indicating copy to clipboard operation
react-native-timed-slideshow copied to clipboard

How to remove the close icon?

Open boypanjaitan16 opened this issue 5 years ago • 3 comments

Let's just say that there is no way the user need to close the slider because it just a banner slider, so how can I hide or remove the close icon ?

boypanjaitan16 avatar Jun 19 '20 04:06 boypanjaitan16

Hello,

I managed to do it with this : Add this to your TimedSlideshow : renderCloseIcon= {() => {styles.closeImgWrapperSlideshow, styles.closeImgWrapperSlideshow, null}}

and in style :

closeImgWrapperSlideshow: {
          position: 'absolute',
          right: 20,
          ...Platform.select({
              ios: {
                  top: 45,
                  shadowColor: '#000',
                  shadowOpacity: 0.5,
                  shadowRadius: 2,
                  shadowOffset: {
                      width: 0,
                      height: 2,
                  },
              },
              android: {
                  top: 35,
                  elevation: 4,
              },
          }),
      },
  closeImgWrapperSlideshow: {
          width: 0,
          height: 0,
          tintColor: 'transparent'
      },

WeeCoopTech avatar Jun 19 '20 15:06 WeeCoopTech

<TimedSlideshow items={items} renderCloseIcon={null} renderCloseIcon={EmptySpace} // onClose={EmptySpace} duration={8000} //renderIcon={BG()} extraSpacing={0} renderFooter={ADD({ index, })}

       //    footerStyle={{ height: 0,  }}
        showProgressBar={null}
      ></TimedSlideshow>

function EmptySpace() { return ( <> <View style={{ height: 0, width: 0 }}></View> </> ) }

visheshsprinzo avatar May 04 '21 07:05 visheshsprinzo

Thanks for the help guys! #staylit

helenaskants avatar Jul 14 '22 11:07 helenaskants