react-native-navigation的迁移库

options-subtitle.mdx 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. ---
  2. id: options-subtitle
  3. title: Subtitle Options
  4. sidebar_label: Subtitle
  5. ---
  6. Controls the top bar subtitle.
  7. ```js
  8. const options = {
  9. topBar: {
  10. subtitle: {}
  11. }
  12. };
  13. ```
  14. ### `text`
  15. Subtitle text.
  16. | Type | Required | Platform |
  17. | ------ | -------- | -------- |
  18. | string | No | Both |
  19. ### `fontSize`
  20. Subtitle fontSize. On Android this value is `sp`.
  21. | Type | Required | Platform |
  22. | ------ | -------- | -------- |
  23. | number | No | Both |
  24. ### `color`
  25. Subtitle color.
  26. | Type | Required | Platform |
  27. | ----- | -------- | -------- |
  28. | Color | No | Both |
  29. ### `fontFamily`
  30. Subtitle FontFamily.
  31. | Type | Required | Platform |
  32. | ---------- | -------- | -------- |
  33. | FontFamily | No | Both |
  34. ### `alignment`
  35. `fill` will make the subtitle stretch and consume all available space in the TopBar while `center` will center the subtitle in the middle of the TopBar.
  36. | Type | Required | Platform |
  37. | ---------------------- | -------- | -------- |
  38. | enum('center', 'fill') | No | Both |
  39. ### `testID`
  40. Used to interact with the TopBar in e2e tests.
  41. | Type | Required | Platform |
  42. | ------ | -------- | -------- |
  43. | string | No | Both |