From 7fb903dc7241eaef154608135efd867e35772fa7 Mon Sep 17 00:00:00 2001 From: Adrian Date: Thu, 14 Sep 2017 14:32:53 +0930 Subject: [PATCH] reverted style changes introduced in orientation fixes (#20) * reverted style changes introduced in orientation fixes * Updated style changes to correctly support cancel button * reduced padding to 5% * Updated overlayStyle in readme --- README.md | 2 +- style.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c3c3d064..44a235af 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,7 @@ Prop | Type | Optional | Default | Description `style` | object | Yes | | style definitions for the root element `selectStyle`       | object   | Yes     | {}         | style definitions for the select element (available in default mode only!). NOTE: Due to breaking changes in React Native, RN < 0.39.0 should pass `flex:1` explicitly to `selectStyle` as a prop. `selectTextStyle` | object | Yes | {} | style definitions for the select element (available in default mode only!) -`overlayStyle` | object | Yes | {} | style definitions for the overly/background element +`overlayStyle` | object | Yes | { flex: 1, padding: '5%', justifyContent: 'center', backgroundColor: 'rgba(0,0,0,0.7)' } | style definitions for the overlay background element. RN <= 0.41 should override this with pixel value for padding. `sectionStyle` | object | Yes | {} | style definitions for the section element `sectionTextStyle` | object | Yes | {} | style definitions for the select text element `optionStyle` | object | Yes | {} | style definitions for the option element diff --git a/style.js b/style.js index 009bf2af..f3fdb933 100644 --- a/style.js +++ b/style.js @@ -11,21 +11,21 @@ export default StyleSheet.create({ overlayStyle: { flex: 1, - padding: 30, + padding: '5%', justifyContent: 'center', backgroundColor: 'rgba(0,0,0,0.7)', }, optionContainer: { borderRadius: BORDER_RADIUS, - flex: 1, + flexShrink: 1, marginBottom: 8, padding: PADDING, backgroundColor: 'rgba(255,255,255,0.8)', }, cancelContainer: { - flex: 1, + flexGrow: 1, maxHeight: 30, alignSelf: 'stretch', },