Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

FormSection.tsx 1.0KB

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