Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add backgroundPosition props #115

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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