Skip to content

Conversation

@nitaking
Copy link

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 nitaking changed the title Add bg props Add backgroundPosition props Mar 24, 2019
@nitaking
Copy link
Author

@oblador
How about that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant