-
Notifications
You must be signed in to change notification settings - Fork 47
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
Option to style container #45
Comments
Hmm, Any idea how we can solve this ?
|
Solution 1 accept a single style with different keys for different sections const styles = {
container: {},
dropdown: {},
textStyle: {}
} and then use it <View style={[style.default, styles.container]}></View> Con : This will be a breaking change Alternative solution: 2nd Way remove the container as React 16 supports arrays return [
<TouchableWithoutFeedback key="press" onPress={this.onPress.bind(this)}>
<View style={[styles.selectBox, style]}>
<View style={styles.selectBoxContent}>
<Text style={textStyle}>{this.state.defaultText}</Text>
<Indicator
direction={indicator}
color={indicatorColor}
size={indicatorSize}
style={indicatorStyle}
/>
</View>
</View>
</TouchableWithoutFeedback>,
<Modal
key={"modal"}
transparent={transparent}
animationType={animationType}
visible={this.state.modalVisible}
onRequestClose={this.onClose.bind(this)}
supportedOrientations={['portrait', 'portrait-upside-down', 'landscape', 'landscape-left', 'landscape-right']}
>
<TouchableWithoutFeedback onPress={this.onModalPress.bind(this)}>
<View style={[styles.modalOverlay, backdropStyle]}>
<OptionList
onSelect={this.onSelect.bind(this)}
selectedStyle={selectedStyle}
selected={selected}
style={[optionListStyle]}
>
{this.props.children}
</OptionList>
</View>
</TouchableWithoutFeedback>
</Modal>] |
this is possible in v2 |
I think this can be implemented now ? |
Guyz, take a call. As long as it doesn't break existing code I shall be
fine. Also on other hand we should not be polluting API with lot of params.
Thanks
…On Thu, Nov 16, 2017 at 3:13 PM, Ritesh Kumar ***@***.***> wrote:
Alternative solution:
Just add another style property. containerStyle
I think this can be implemented now ?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#45 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFYnVhcUymZ9o5--XTFbu4y-br-vw58_ks5s3AOxgaJpZM4QezUK>
.
|
hi guys, can you give an example of how to use indicatorColor and indicatorSize? Here my code:
|
I need to update the style of this
Or maybe use an array instead of a wrapper.
Con: Only supported in React 16.
The text was updated successfully, but these errors were encountered: