Application Android et IOS pour l'amicale des élèves
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SpeechArrow.js 972B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // @flow
  2. import * as React from 'react';
  3. import {View} from 'react-native';
  4. import type {ViewStyle} from 'react-native/Libraries/StyleSheet/StyleSheet';
  5. type PropsType = {
  6. style?: ViewStyle | null,
  7. size: number,
  8. color: string,
  9. };
  10. export default class SpeechArrow extends React.Component<PropsType> {
  11. static defaultProps = {
  12. style: null,
  13. };
  14. shouldComponentUpdate(): boolean {
  15. return false;
  16. }
  17. render(): React.Node {
  18. const {props} = this;
  19. return (
  20. <View style={props.style}>
  21. <View
  22. style={{
  23. width: 0,
  24. height: 0,
  25. borderLeftWidth: 0,
  26. borderRightWidth: props.size,
  27. borderBottomWidth: props.size,
  28. borderStyle: 'solid',
  29. backgroundColor: 'transparent',
  30. borderLeftColor: 'transparent',
  31. borderRightColor: 'transparent',
  32. borderBottomColor: props.color,
  33. }}
  34. />
  35. </View>
  36. );
  37. }
  38. }