[React Native] Support variable corner radii on RCTView

This commit is contained in:
Alex Akers
2015-05-13 08:22:21 -07:00
committed by Christopher Chedeau
parent f40a7b4609
commit 86709c15cb
6 changed files with 119 additions and 44 deletions

View File

@@ -68,6 +68,18 @@ var styles = StyleSheet.create({
borderLeftWidth: 40,
borderLeftColor: 'blue',
},
border6: {
borderTopWidth: 10,
borderTopColor: 'red',
borderRightWidth: 20,
borderRightColor: 'yellow',
borderBottomWidth: 30,
borderBottomColor: 'green',
borderLeftWidth: 40,
borderLeftColor: 'blue',
borderTopLeftRadius: 100,
},
});
exports.title = 'Border';
@@ -115,4 +127,11 @@ exports.examples = [
return <View style={[styles.box, styles.border5]} />;
}
},
{
title: 'Custom Borders',
description: 'border*Width & border*Color',
render() {
return <View style={[styles.box, styles.border6]} />;
}
},
];

View File

@@ -69,9 +69,10 @@ var styles = StyleSheet.create({
overflow: 'hidden',
},
titleContainer: {
borderWidth: 0.5,
borderRadius: 2.5,
borderColor: '#d6d7da',
borderBottomWidth: 0.5,
borderTopLeftRadius: 3,
borderTopRightRadius: 2.5,
borderBottomColor: '#d6d7da',
backgroundColor: '#f6f7f8',
paddingHorizontal: 10,
paddingVertical: 5,