1 | import React from 'react';
|
2 | import { View, StyleSheet } from 'react-native';
|
3 | const Triangle = ({ style, isDown, }) => (<View style={StyleSheet.flatten([
|
4 | styles.triangle,
|
5 | style,
|
6 | isDown ? styles.down : {},
|
7 | ])}/>);
|
8 | const styles = StyleSheet.create({
|
9 | down: {
|
10 | transform: [{ rotate: '180deg' }],
|
11 | },
|
12 | triangle: {
|
13 | width: 0,
|
14 | height: 0,
|
15 | backgroundColor: 'transparent',
|
16 | borderStyle: 'solid',
|
17 | borderLeftWidth: 8,
|
18 | borderRightWidth: 8,
|
19 | borderBottomWidth: 15,
|
20 | borderLeftColor: 'transparent',
|
21 | borderRightColor: 'transparent',
|
22 | borderBottomColor: 'white',
|
23 | },
|
24 | });
|
25 | export default Triangle;
|
26 |
|
\ | No newline at end of file |