daily pastebin goal
22%
SHARE
TWEET

Untitled

a guest Mar 24th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import React from 'react';
  2. import { StyleSheet, Text, View } from 'react-native';
  3.  
  4. export default class ExerciseCard extends React.Component {
  5.   constructor(props) {
  6.     super(props);
  7.   }
  8.  
  9.     render() {
  10.         return(
  11.             <View style={styles.card}>
  12.                 <Text style={styles.exerciseLabel}>
  13.                     {this.props.name}
  14.                 </Text>
  15.                 <View style={styles.badge}>
  16.                     <Text style={styles.badgeText}>{this.props.equipment_type}</Text>
  17.                 </View>
  18.             </View>
  19.         );
  20.     }
  21. }
  22.  
  23. const styles = StyleSheet.create({
  24.     card: {
  25.         width: '98%',
  26.         height: 50,
  27.         flex: 1,
  28.         flexDirection: 'row',
  29.         justifyContent: 'space-between',
  30.         paddingTop: 5,
  31.         paddingBottom: 5,
  32.         borderTopWidth: .5,
  33.         borderTopColor: 'black',
  34.         backgroundColor: '#fff',
  35.     },
  36.     cardTitle: {
  37.         flex: 1,
  38.         flexDirection: 'row',
  39.         justifyContent: 'space-between',
  40.         marginBottom: 10,
  41.     },
  42.     exerciseLabel: {
  43.         fontWeight: 'bold',
  44.         fontSize: 24,
  45.     },
  46.     badge: {
  47.         width: '35%',
  48.         height: 30,
  49.         backgroundColor: '#00adf5',
  50.         borderRadius: 5,
  51.         alignItems: 'center',
  52.     },
  53.     badgeText: {
  54.         color: '#fff',
  55.         fontSize: 18,
  56.         paddingTop: 6,
  57.     },
  58.     exerciseText: {
  59.         fontWeight: 'bold',
  60.         fontSize: 24,
  61.         color: '#000000',
  62.     },
  63.     equipmentText: {
  64.         fontWeight: 'normal',
  65.         fontSize: 18,
  66.         color: '#404040',
  67.     }
  68. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top