廓形仪rn版本-技术调研
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.

37 lines
876 B

  1. import { View, Text, StyleSheet } from 'react-native';
  2. export default function StatusItem({ text, state = 0 }: { text: string; state?: number }) {
  3. return (
  4. <View style={styles.statusItem}>
  5. <View style={styles.outerCircle}>
  6. <View style={styles.innerCircle}></View>
  7. </View>
  8. <Text style={{color: '#555'}}>{text}</Text>
  9. </View>
  10. );
  11. }
  12. const styles = StyleSheet.create({
  13. statusItem: {
  14. height: 40,
  15. backgroundColor: '#FFF',
  16. borderRadius: 8,
  17. flexDirection: 'row',
  18. alignItems: 'center',
  19. paddingHorizontal: 8,
  20. gap: 6
  21. },
  22. outerCircle:{
  23. width: 14,
  24. height: 14,
  25. backgroundColor: 'rgba(82, 196, 26, 0.35)',
  26. borderRadius: 999,
  27. justifyContent: 'center',
  28. alignItems: 'center'
  29. },
  30. innerCircle: {
  31. width: 10,
  32. height: 10,
  33. backgroundColor: '#52C41A',
  34. borderRadius: 999,
  35. }
  36. });