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.

title_bar_button.js 764B

123456789101112131415161718192021222324252627282930313233
  1. import React from 'react';
  2. import { StyleSheet, Text, Pressable, View, TextInput, Button } from 'react-native';
  3. export default function TitleBarButton(props){
  4. return(
  5. <Pressable
  6. style={[styles.button, (props.currentDurationMode == props.durationMode ? styles.highlighted : null)]}
  7. onPress={() => {
  8. props.onChangeDuration(props.durationMode)
  9. props.onDurationEdit(null);
  10. }}>
  11. <Text>{props.durationMode}</Text>
  12. </Pressable>
  13. )
  14. }
  15. const styles = StyleSheet.create({
  16. button: {
  17. padding: 1,
  18. margin:1,
  19. borderWidth: 1,
  20. },
  21. input: {
  22. borderWidth: 0.5
  23. },
  24. highlighted: {
  25. backgroundColor: "#ECECEC",
  26. borderWidth: 1.5,
  27. }
  28. });