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.

CircularLabel.native.js 1.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // @flow
  2. import React from 'react';
  3. import { Text, View } from 'react-native';
  4. import { combineStyles, type StyleType } from '../../styles';
  5. import AbstractCircularLabel, {
  6. type Props as AbstractProps
  7. } from './AbstractCircularLabel';
  8. import styles from './styles';
  9. type Props = AbstractProps & {
  10. /**
  11. * Style of the label.
  12. */
  13. style?: ?StyleType
  14. };
  15. /**
  16. * Renders a circular indicator to be used for status icons, such as recording
  17. * on, audio-only conference, video quality and similar.
  18. */
  19. export default class CircularLabel extends AbstractCircularLabel<Props> {
  20. /**
  21. * Implements React {@link Component}'s render.
  22. *
  23. * @inheritdoc
  24. */
  25. render() {
  26. const { label, style } = this.props;
  27. return (
  28. <View
  29. style = {
  30. combineStyles(styles.indicatorContainer, style)
  31. }>
  32. <Text style = { styles.indicatorText }>
  33. { label }
  34. </Text>
  35. </View>
  36. );
  37. }
  38. }