react-native-lightbox icon indicating copy to clipboard operation
react-native-lightbox copied to clipboard

Add backgroundPosition props

Open nitaking opened this issue 6 years ago • 1 comments

About

What want to do:

I wanna control the position of the content component.

Example, I wanna put content in flex-start instead of center.

Add:

Add backgroundPosition props.

ScreenShot

flex-start

        <Lightbox 
          underlayColor="white"
          backgroundColor="grey"
++        backgroundPosition="flex-start"
          onOpen={() => this.setState({ isShowContent: true })}
          willClose={() => this.setState({ isShowContent: false })}
        >
          <View style={{ backgroundColor: 'blue' }}>
            <Text style={{ color: 'white' }} >TextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextText</Text>
            {this.state.isShowContent && 
              <View style={{ backgroundColor: 'green' }}>
                <Text>
                  ContentsContentsContentsContentsContentsContentsContentsContentsContentsContentsContentsContentsContentsContentsContentsContentsContentsContentsContents
                </Text>
              </View>
            }
          </View>
        </Lightbox>

flex-end

        <Lightbox 
          underlayColor="white"
          backgroundColor="grey"
++        backgroundPosition="flex-end"
          onOpen={() => this.setState({ isShowContent: true })}
          willClose={() => this.setState({ isShowContent: false })}
        >
          <View style={{ backgroundColor: 'blue' }}>
            <Text style={{ color: 'white' }} >TextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextText</Text>
            {this.state.isShowContent && 
              <View style={{ backgroundColor: 'green' }}>
                <Text>
                  ContentsContentsContentsContentsContentsContentsContentsContentsContentsContentsContentsContentsContentsContentsContentsContentsContentsContentsContents
                </Text>
              </View>
            }
          </View>
        </Lightbox>

nitaking avatar Mar 24 '19 04:03 nitaking

@oblador How about that?

nitaking avatar Mar 26 '19 03:03 nitaking