expression.js 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <View
  2. style={
  3. {
  4. someVeryLongStyle1: "true",
  5. someVeryLongStyle2: "true",
  6. someVeryLongStyle3: "true",
  7. someVeryLongStyle4: "true"
  8. }
  9. }
  10. />;
  11. <View
  12. style={
  13. [
  14. {
  15. someVeryLongStyle1: "true",
  16. someVeryLongStyle2: "true",
  17. someVeryLongStyle3: "true",
  18. someVeryLongStyle4: "true"
  19. }
  20. ]
  21. }
  22. />;
  23. <Something>
  24. {() => (
  25. <SomethingElse>
  26. <span />
  27. </SomethingElse>
  28. )}
  29. </Something>;
  30. <Something>
  31. {items.map(item => (
  32. <SomethingElse>
  33. <span />
  34. </SomethingElse>
  35. ))}
  36. </Something>;
  37. <Something>
  38. {function() {
  39. return (
  40. <SomethingElse>
  41. <span />
  42. </SomethingElse>
  43. );
  44. }}
  45. </Something>;
  46. <RadioListItem
  47. key={option}
  48. imageSource={this.props.veryBigItemImageSourceFunc &&
  49. this.props.veryBigItemImageSourceFunc(option)}
  50. imageSize={this.props.veryBigItemImageSize}
  51. imageView={this.props.veryBigItemImageViewFunc &&
  52. this.props.veryBigItemImageViewFunc(option)}
  53. heading={this.props.displayTextFunc(option)}
  54. value={option}
  55. />;
  56. <ParentComponent prop={
  57. <Child>
  58. test
  59. </Child>
  60. }/>;
  61. <BookingIntroPanel
  62. prop="long_string_make_to_force_break"
  63. logClick={data => doLogClick("short", "short", data)}
  64. />;
  65. <BookingIntroPanel
  66. logClick={data =>
  67. doLogClick("long_name_long_name_long_name", "long_name_long_name_long_name", data)
  68. }
  69. />;
  70. <BookingIntroPanel
  71. logClick={data => {
  72. doLogClick("long_name_long_name_long_name", "long_name_long_name_long_name", data)
  73. }}
  74. />;
  75. <Component
  76. onChange={(
  77. key: "possible_key_1" | "possible_key_2" | "possible_key_3",
  78. value: string | Immutable.List<string>,
  79. ) => {
  80. this.setState({
  81. updatedTask: this.state.updatedTask.set(key, value)
  82. });
  83. }}
  84. />;
  85. <BookingIntroPanel>
  86. {data => doLogClick("short", "short", data)}
  87. </BookingIntroPanel>;
  88. <BookingIntroPanel>
  89. {data =>
  90. doLogClick("long_name_long_name_long_name", "long_name_long_name_long_name", data)
  91. }
  92. </BookingIntroPanel>;
  93. <BookingIntroPanel>
  94. {data => {
  95. doLogClick("long_name_long_name_long_name", "long_name_long_name_long_name", data)
  96. }}
  97. </BookingIntroPanel>;
  98. <Component>
  99. {(
  100. key: "possible_key_1" | "possible_key_2" | "possible_key_3",
  101. value: string | Immutable.List<string>,
  102. ) => {
  103. this.setState({
  104. updatedTask: this.state.updatedTask.set(key, value)
  105. });
  106. }}
  107. </Component>;