Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

FormSection.tsx 907B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import React from 'react';
  2. import { WithTranslation } from 'react-i18next';
  3. import { Text, View } from 'react-native';
  4. import { translate } from '../../../base/i18n/functions';
  5. import styles from './styles';
  6. /**
  7. * The type of the React {@code Component} props of {@link FormSection}.
  8. */
  9. interface IProps extends WithTranslation {
  10. /**
  11. * The children to be displayed within this Link.
  12. */
  13. children: React.ReactNode;
  14. /**
  15. * The i18n key of the text label of the section.
  16. */
  17. label?: string;
  18. }
  19. /**
  20. * Section accordion on settings form.
  21. *
  22. * @returns {React$Element<any>}
  23. */
  24. function FormSection({ children, label, t }: IProps) {
  25. return (
  26. <View>
  27. {label && <Text style = { styles.formSectionTitleText }>
  28. { t(label) }
  29. </Text>}
  30. { children }
  31. </View>
  32. );
  33. }
  34. export default translate(FormSection);