var Triangle = React.createClass({
render: function() {
return (
<View style={[styles.triangle, this.props.style]} />
)
}
})
triangle: {
width: 0,
height: 0,
backgroundColor: 'transparent',
borderStyle: 'solid',
borderLeftWidth: 50,
borderRightWidth: 50,
borderBottomWidth: 100,
borderLeftColor: 'transparent',
borderRightColor: 'transparent',
borderBottomColor: 'red'
}
var TriangleDown = React.createClass({
render: function() {
return (
<Triangle style={styles.triangleDown}/>
)
}
triangleDown: {
transform: [
{rotate: '180deg'}
]
}
var TriangleLeft = React.createClass({
render: function() {
return (
<Triangle style={styles.triangleLeft}/>
)
}
})
triangleLeft: {
transform: [
{rotate: '-90deg'}
]
}