mirror of
https://github.com/status-im/react-native.git
synced 2025-02-20 21:28:08 +00:00
- [React Native] Fix incorrect if-statement in RCTGeolocation | Alex Akers - [ReactNative] s/ReactKit/React/g | Tadeu Zagallo - [React Native] View border support | Nick Lockwood - [Assets] Allow scripts to override assetRoots | Amjad Masad - [ReactNative] Navigator docs | Eric Vicenti - [ReactNative] License headers and renaming | Eric Vicenti - [React Native] Add CocoaPods spec | Tadeu Zagallo - Added explicit types for all view properties | Nick Lockwood - [ReactNative] s/ReactNavigator/Navigator/ | Tadeu Zagallo - [ReactNative] Add copyright header for code copied from the jQuery UI project | Martin Konicek - [ReactNative] PanResponder documentation | Eric Vicenti
91 lines
1.8 KiB
JavaScript
91 lines
1.8 KiB
JavaScript
/**
|
|
* Copyright 2004-present Facebook. All Rights Reserved.
|
|
*/
|
|
'use strict';
|
|
|
|
var React = require('react-native');
|
|
var {
|
|
StyleSheet,
|
|
View
|
|
} = React;
|
|
|
|
var styles = StyleSheet.create({
|
|
box: {
|
|
width: 100,
|
|
height: 100,
|
|
},
|
|
border1: {
|
|
borderWidth: 10,
|
|
borderColor: 'brown',
|
|
},
|
|
borderRadius: {
|
|
borderWidth: 10,
|
|
borderRadius: 10,
|
|
borderColor: 'cyan',
|
|
},
|
|
border2: {
|
|
borderWidth: 10,
|
|
borderTopColor: 'red',
|
|
borderRightColor: 'yellow',
|
|
borderBottomColor: 'green',
|
|
borderLeftColor: 'blue',
|
|
},
|
|
border3: {
|
|
borderColor: 'purple',
|
|
borderTopWidth: 10,
|
|
borderRightWidth: 20,
|
|
borderBottomWidth: 30,
|
|
borderLeftWidth: 40,
|
|
},
|
|
border4: {
|
|
borderTopWidth: 10,
|
|
borderTopColor: 'red',
|
|
borderRightWidth: 20,
|
|
borderRightColor: 'yellow',
|
|
borderBottomWidth: 30,
|
|
borderBottomColor: 'green',
|
|
borderLeftWidth: 40,
|
|
borderLeftColor: 'blue',
|
|
},
|
|
});
|
|
|
|
exports.title = 'Border';
|
|
exports.description = 'View borders';
|
|
exports.examples = [
|
|
{
|
|
title: 'Equal-Width / Same-Color',
|
|
description: 'borderWidth & borderColor',
|
|
render() {
|
|
return <View style={[styles.box, styles.border1]} />;
|
|
}
|
|
},
|
|
{
|
|
title: 'Equal-Width / Same-Color',
|
|
description: 'borderWidth & borderColor',
|
|
render() {
|
|
return <View style={[styles.box, styles.borderRadius]} />;
|
|
}
|
|
},
|
|
{
|
|
title: 'Equal-Width Borders',
|
|
description: 'borderWidth & border*Color',
|
|
render() {
|
|
return <View style={[styles.box, styles.border2]} />;
|
|
}
|
|
},
|
|
{
|
|
title: 'Same-Color Borders',
|
|
description: 'border*Width & borderColor',
|
|
render() {
|
|
return <View style={[styles.box, styles.border3]} />;
|
|
}
|
|
},
|
|
{
|
|
title: 'Custom Borders',
|
|
description: 'border*Width & border*Color',
|
|
render() {
|
|
return <View style={[styles.box, styles.border4]} />;
|
|
}
|
|
},
|
|
];
|