showing results for - "react native ribbon"
Fabio
26 Sep 2019
1import React, {useEffect, useState, useRef} from 'react';
2import {
3  Text,
4  View,
5  Dimensions,
6  Image,
7  Animated,
8  StyleSheet,
9} from 'react-native';
10
11export default function BadgeRibbon(props) {
12  return (
13    <View>
14      <View
15        style={{
16          width: 120,
17          padding: 10,
18          paddingLeft: 20,
19          justifyContent: 'center',
20          alignItems: 'center',
21          backgroundColor: '#1CCD75',
22          height: 40,
23          borderTopRightRadius: 3,
24          borderBottomRightRadius: 3,
25        }}>
26        <Text style={{color: '#FFF', fontWeight: 'bold'}}>{props.text}</Text>
27      </View>
28      <View
29        style={{
30          width: 0,
31          height: 0,
32          backgroundColor: 'transparent',
33          borderStyle: 'solid',
34          borderRightWidth: 20,
35          borderTopWidth: 20,
36          borderRightColor: 'transparent',
37          borderTopColor: '#232F3B',
38          transform: [{rotate: '90deg'}],
39        }}
40      />
41    </View>
42  );
43}
44