@ledgerhq/lumen-ui-rnative 0.0.43 → 0.0.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (337) hide show
  1. package/.storybook/Decorator.tsx +78 -13
  2. package/.storybook/docs/getting-started/ThemeProvider.mdx +1 -1
  3. package/.storybook/docs/style-system/lx.mdx +144 -0
  4. package/.storybook/docs/style-system/useCreate.mdx +95 -0
  5. package/.storybook/docs/style-system/useTheme.mdx +52 -0
  6. package/.storybook/preview-head.html +2 -2
  7. package/.storybook/{preview.ts → preview.tsx} +6 -1
  8. package/dist/package.json +2 -3
  9. package/dist/src/lib/Components/AddressInput/AddressInput.js +1 -1
  10. package/dist/src/lib/Components/AddressInput/AddressInput.stories.d.ts +7 -1
  11. package/dist/src/lib/Components/AddressInput/AddressInput.stories.d.ts.map +1 -1
  12. package/dist/src/lib/Components/AddressInput/AddressInput.stories.js +98 -9
  13. package/dist/src/lib/Components/AmountInput/AmountInput.d.ts.map +1 -1
  14. package/dist/src/lib/Components/AmountInput/AmountInput.js +3 -3
  15. package/dist/src/lib/Components/AmountInput/AmountInput.stories.d.ts +10 -1
  16. package/dist/src/lib/Components/AmountInput/AmountInput.stories.d.ts.map +1 -1
  17. package/dist/src/lib/Components/AmountInput/AmountInput.stories.js +162 -9
  18. package/dist/src/lib/Components/BaseInput/BaseInput.d.ts.map +1 -1
  19. package/dist/src/lib/Components/BaseInput/BaseInput.js +2 -19
  20. package/dist/src/lib/Components/BottomSheet/BottomSheet.js +1 -1
  21. package/dist/src/lib/Components/BottomSheet/BottomSheet.stories.js +8 -8
  22. package/dist/src/lib/Components/Button/BaseButton.d.ts +3 -3
  23. package/dist/src/lib/Components/Button/BaseButton.d.ts.map +1 -1
  24. package/dist/src/lib/Components/Button/BaseButton.js +99 -119
  25. package/dist/src/lib/Components/Button/Button.d.ts +4 -26
  26. package/dist/src/lib/Components/Button/Button.d.ts.map +1 -1
  27. package/dist/src/lib/Components/Button/Button.js +2 -2
  28. package/dist/src/lib/Components/Button/Button.stories.d.ts +1 -1
  29. package/dist/src/lib/Components/Button/Button.stories.d.ts.map +1 -1
  30. package/dist/src/lib/Components/Button/Button.stories.js +25 -48
  31. package/dist/src/lib/Components/Button/index.d.ts +1 -1
  32. package/dist/src/lib/Components/Button/index.d.ts.map +1 -1
  33. package/dist/src/lib/Components/Button/index.js +1 -1
  34. package/dist/src/lib/Components/Button/{BaseButton.types.d.ts → types.d.ts} +15 -10
  35. package/dist/src/lib/Components/Button/types.d.ts.map +1 -0
  36. package/dist/src/lib/Components/CardButton/CardButton.d.ts +4 -3
  37. package/dist/src/lib/Components/CardButton/CardButton.d.ts.map +1 -1
  38. package/dist/src/lib/Components/CardButton/CardButton.js +65 -71
  39. package/dist/src/lib/Components/CardButton/CardButton.stories.d.ts.map +1 -1
  40. package/dist/src/lib/Components/CardButton/CardButton.stories.js +28 -15
  41. package/dist/src/lib/Components/CardButton/index.d.ts +1 -1
  42. package/dist/src/lib/Components/CardButton/index.d.ts.map +1 -1
  43. package/dist/src/lib/Components/CardButton/index.js +1 -1
  44. package/dist/src/lib/Components/CardButton/{CardButton.types.d.ts → types.d.ts} +5 -4
  45. package/dist/src/lib/Components/CardButton/types.d.ts.map +1 -0
  46. package/dist/src/lib/Components/Icon/Icon.d.ts +6 -3
  47. package/dist/src/lib/Components/Icon/Icon.d.ts.map +1 -1
  48. package/dist/src/lib/Components/Icon/Icon.js +24 -25
  49. package/dist/src/lib/Components/Icon/Icon.stories.d.ts +2 -2
  50. package/dist/src/lib/Components/Icon/Icon.stories.d.ts.map +1 -1
  51. package/dist/src/lib/Components/Icon/Icon.stories.js +73 -19
  52. package/dist/src/lib/Components/Icon/createIcon.d.ts +1 -1
  53. package/dist/src/lib/Components/Icon/createIcon.d.ts.map +1 -1
  54. package/dist/src/lib/Components/Icon/createIcon.js +1 -2
  55. package/dist/src/lib/Components/Icon/index.d.ts +1 -1
  56. package/dist/src/lib/Components/Icon/index.d.ts.map +1 -1
  57. package/dist/src/lib/Components/Icon/index.js +1 -1
  58. package/dist/src/lib/Components/Icon/{Icon.types.d.ts → types.d.ts} +7 -4
  59. package/dist/src/lib/Components/Icon/types.d.ts.map +1 -0
  60. package/dist/src/lib/Components/IconButton/IconButton.d.ts +2 -19
  61. package/dist/src/lib/Components/IconButton/IconButton.d.ts.map +1 -1
  62. package/dist/src/lib/Components/IconButton/IconButton.stories.d.ts.map +1 -1
  63. package/dist/src/lib/Components/IconButton/IconButton.stories.js +9 -11
  64. package/dist/src/lib/Components/IconButton/index.d.ts +1 -0
  65. package/dist/src/lib/Components/IconButton/index.d.ts.map +1 -1
  66. package/dist/src/lib/Components/IconButton/index.js +1 -0
  67. package/dist/src/lib/Components/IconButton/types.d.ts +12 -0
  68. package/dist/src/lib/Components/IconButton/types.d.ts.map +1 -0
  69. package/dist/src/lib/Components/InteractiveIcon/InteractiveIcon.d.ts +2 -2
  70. package/dist/src/lib/Components/InteractiveIcon/InteractiveIcon.d.ts.map +1 -1
  71. package/dist/src/lib/Components/InteractiveIcon/InteractiveIcon.figma.js +1 -1
  72. package/dist/src/lib/Components/InteractiveIcon/InteractiveIcon.js +34 -34
  73. package/dist/src/lib/Components/InteractiveIcon/InteractiveIcon.stories.d.ts +1 -1
  74. package/dist/src/lib/Components/InteractiveIcon/InteractiveIcon.stories.d.ts.map +1 -1
  75. package/dist/src/lib/Components/InteractiveIcon/InteractiveIcon.stories.js +22 -9
  76. package/dist/src/lib/Components/InteractiveIcon/types.d.ts +3 -7
  77. package/dist/src/lib/Components/InteractiveIcon/types.d.ts.map +1 -1
  78. package/dist/src/lib/Components/Link/Link.d.ts +7 -77
  79. package/dist/src/lib/Components/Link/Link.d.ts.map +1 -1
  80. package/dist/src/lib/Components/Link/Link.js +59 -75
  81. package/dist/src/lib/Components/Link/Link.stories.d.ts.map +1 -1
  82. package/dist/src/lib/Components/Link/Link.stories.js +34 -11
  83. package/dist/src/lib/Components/Link/index.d.ts +1 -0
  84. package/dist/src/lib/Components/Link/index.d.ts.map +1 -1
  85. package/dist/src/lib/Components/Link/index.js +1 -0
  86. package/dist/src/lib/Components/Link/types.d.ts +43 -0
  87. package/dist/src/lib/Components/Link/types.d.ts.map +1 -0
  88. package/dist/src/lib/Components/Link/types.js +1 -0
  89. package/dist/src/lib/Components/Search/Search.stories.d.ts +6 -1
  90. package/dist/src/lib/Components/Search/Search.stories.d.ts.map +1 -1
  91. package/dist/src/lib/Components/Search/Search.stories.js +71 -9
  92. package/dist/src/lib/Components/Select/Select.d.ts.map +1 -1
  93. package/dist/src/lib/Components/Select/Select.js +1 -17
  94. package/dist/src/lib/Components/Spinner/Spinner.d.ts +13 -16
  95. package/dist/src/lib/Components/Spinner/Spinner.d.ts.map +1 -1
  96. package/dist/src/lib/Components/Spinner/Spinner.js +33 -5
  97. package/dist/src/lib/Components/Spinner/Spinner.stories.d.ts.map +1 -1
  98. package/dist/src/lib/Components/Spinner/Spinner.stories.js +1 -1
  99. package/dist/src/lib/Components/Spinner/index.d.ts +1 -0
  100. package/dist/src/lib/Components/Spinner/index.d.ts.map +1 -1
  101. package/dist/src/lib/Components/Spinner/index.js +1 -0
  102. package/dist/src/lib/Components/Spinner/types.d.ts +15 -0
  103. package/dist/src/lib/Components/Spinner/types.d.ts.map +1 -0
  104. package/dist/src/lib/Components/Spinner/types.js +1 -0
  105. package/dist/src/lib/Components/Tag/Tag.d.ts +2 -1
  106. package/dist/src/lib/Components/Tag/Tag.d.ts.map +1 -1
  107. package/dist/src/lib/Components/Tag/Tag.js +15 -4
  108. package/dist/src/lib/Components/Tag/Tag.stories.js +1 -1
  109. package/dist/src/lib/Components/Tag/Tag.types.d.ts +7 -1
  110. package/dist/src/lib/Components/Tag/Tag.types.d.ts.map +1 -1
  111. package/dist/src/lib/Components/TextInput/TextInput.stories.d.ts +8 -1
  112. package/dist/src/lib/Components/TextInput/TextInput.stories.d.ts.map +1 -1
  113. package/dist/src/lib/Components/TextInput/TextInput.stories.js +104 -9
  114. package/dist/src/lib/Components/Tile/Tile.d.ts.map +1 -1
  115. package/dist/src/lib/Components/Tile/Tile.js +54 -8
  116. package/dist/src/lib/Components/Tile/types.d.ts +14 -1
  117. package/dist/src/lib/Components/Tile/types.d.ts.map +1 -1
  118. package/dist/src/lib/Components/Tooltip/Tooltip.stories.js +2 -2
  119. package/dist/src/lib/Components/Utility/Box/Box.d.ts +39 -0
  120. package/dist/src/lib/Components/Utility/Box/Box.d.ts.map +1 -0
  121. package/dist/src/lib/Components/{Box → Utility/Box}/Box.js +10 -11
  122. package/dist/src/lib/Components/Utility/Box/Box.stories.d.ts.map +1 -0
  123. package/dist/src/lib/Components/{Box → Utility/Box}/Box.stories.js +13 -12
  124. package/dist/src/lib/Components/Utility/Box/index.d.ts +2 -0
  125. package/dist/src/lib/Components/Utility/Box/index.d.ts.map +1 -0
  126. package/dist/src/lib/Components/Utility/Pressable/Pressable.d.ts +34 -0
  127. package/dist/src/lib/Components/Utility/Pressable/Pressable.d.ts.map +1 -0
  128. package/dist/src/lib/Components/Utility/Pressable/Pressable.js +33 -0
  129. package/dist/src/lib/Components/Utility/Pressable/Pressable.stories.d.ts +7 -0
  130. package/dist/src/lib/Components/Utility/Pressable/Pressable.stories.d.ts.map +1 -0
  131. package/dist/src/lib/Components/Utility/Pressable/Pressable.stories.js +47 -0
  132. package/dist/src/lib/Components/Utility/Pressable/index.d.ts +3 -0
  133. package/dist/src/lib/Components/Utility/Pressable/index.d.ts.map +1 -0
  134. package/dist/src/lib/Components/Utility/Pressable/index.js +1 -0
  135. package/dist/src/lib/Components/Utility/Pressable/types.d.ts +3 -0
  136. package/dist/src/lib/Components/Utility/Pressable/types.d.ts.map +1 -0
  137. package/dist/src/lib/Components/Utility/Pressable/types.js +1 -0
  138. package/dist/src/lib/Components/Utility/Text/Text.d.ts +40 -0
  139. package/dist/src/lib/Components/Utility/Text/Text.d.ts.map +1 -0
  140. package/dist/src/lib/Components/{Text → Utility/Text}/Text.js +13 -9
  141. package/dist/src/lib/Components/Utility/Text/Text.stories.d.ts.map +1 -0
  142. package/dist/src/lib/Components/{Text → Utility/Text}/Text.stories.js +3 -3
  143. package/dist/src/lib/Components/Utility/Text/index.d.ts.map +1 -0
  144. package/dist/src/lib/Components/Utility/index.d.ts +4 -0
  145. package/dist/src/lib/Components/Utility/index.d.ts.map +1 -0
  146. package/dist/src/lib/Components/Utility/index.js +3 -0
  147. package/dist/src/lib/Components/index.d.ts +1 -3
  148. package/dist/src/lib/Components/index.d.ts.map +1 -1
  149. package/dist/src/lib/Components/index.js +1 -3
  150. package/dist/src/lib/utils/components/InjectStylesIntoChildren.d.ts +6 -5
  151. package/dist/src/lib/utils/components/InjectStylesIntoChildren.d.ts.map +1 -1
  152. package/dist/src/lib/utils/components/InjectStylesIntoChildren.js +6 -6
  153. package/dist/src/styles/LumenStyleSheet.d.ts +1 -1
  154. package/dist/src/styles/LumenStyleSheet.d.ts.map +1 -1
  155. package/dist/src/styles/Provider/createStylesheetTheme.d.ts +0 -1
  156. package/dist/src/styles/Provider/createStylesheetTheme.d.ts.map +1 -1
  157. package/dist/src/styles/Provider/createStylesheetTheme.js +0 -1
  158. package/dist/src/styles/create/useCreate.d.ts +2 -1
  159. package/dist/src/styles/create/useCreate.d.ts.map +1 -1
  160. package/dist/src/styles/create/useCreate.js +5 -5
  161. package/dist/src/styles/factories/areLxPropsEqual.d.ts +3 -0
  162. package/dist/src/styles/factories/areLxPropsEqual.d.ts.map +1 -0
  163. package/dist/src/styles/factories/areLxPropsEqual.js +15 -0
  164. package/dist/src/styles/factories/createStyledPressable.d.ts +26 -0
  165. package/dist/src/styles/factories/createStyledPressable.d.ts.map +1 -0
  166. package/dist/src/styles/factories/createStyledPressable.js +61 -0
  167. package/dist/src/styles/factories/createStyledText.d.ts +15 -26
  168. package/dist/src/styles/factories/createStyledText.d.ts.map +1 -1
  169. package/dist/src/styles/factories/createStyledText.js +13 -29
  170. package/dist/src/styles/factories/createStyledView.d.ts +7 -27
  171. package/dist/src/styles/factories/createStyledView.d.ts.map +1 -1
  172. package/dist/src/styles/factories/createStyledView.js +10 -30
  173. package/dist/src/styles/factories/index.d.ts +4 -0
  174. package/dist/src/styles/factories/index.d.ts.map +1 -0
  175. package/dist/src/styles/factories/index.js +3 -0
  176. package/dist/src/styles/index.d.ts +2 -3
  177. package/dist/src/styles/index.d.ts.map +1 -1
  178. package/dist/src/styles/index.js +2 -3
  179. package/dist/src/styles/resolveStyle/resolveConfig.d.ts +7 -7
  180. package/dist/src/styles/resolveStyle/resolveConfig.d.ts.map +1 -1
  181. package/dist/src/styles/resolveStyle/resolveConfig.js +9 -9
  182. package/dist/src/styles/resolveStyle/resolveStyle.d.ts +6 -20
  183. package/dist/src/styles/resolveStyle/resolveStyle.d.ts.map +1 -1
  184. package/dist/src/styles/resolveStyle/resolveStyle.js +4 -29
  185. package/dist/src/styles/types/create.types.d.ts +1 -1
  186. package/dist/src/styles/types/create.types.d.ts.map +1 -1
  187. package/dist/src/styles/types/styled.types.d.ts +72 -50
  188. package/dist/src/styles/types/styled.types.d.ts.map +1 -1
  189. package/dist/src/styles/types/utility.types.d.ts.map +1 -1
  190. package/dist/src/styles/utils/index.d.ts +2 -0
  191. package/dist/src/styles/utils/index.d.ts.map +1 -0
  192. package/dist/src/styles/utils/index.js +1 -0
  193. package/dist/src/styles/utils/mergeStyles.d.ts +16 -0
  194. package/dist/src/styles/utils/mergeStyles.d.ts.map +1 -0
  195. package/dist/src/styles/utils/mergeStyles.js +20 -0
  196. package/package.json +3 -4
  197. package/src/lib/Components/AddressInput/AddressInput.mdx +15 -4
  198. package/src/lib/Components/AddressInput/AddressInput.stories.tsx +133 -17
  199. package/src/lib/Components/AddressInput/AddressInput.tsx +1 -1
  200. package/src/lib/Components/AmountInput/AmountInput.mdx +20 -1
  201. package/src/lib/Components/AmountInput/AmountInput.stories.tsx +180 -17
  202. package/src/lib/Components/AmountInput/AmountInput.tsx +24 -15
  203. package/src/lib/Components/Banner/Banner.test.tsx +48 -15
  204. package/src/lib/Components/BaseInput/BaseInput.tsx +6 -35
  205. package/src/lib/Components/BottomSheet/BottomSheet.stories.tsx +8 -8
  206. package/src/lib/Components/BottomSheet/BottomSheet.tsx +1 -1
  207. package/src/lib/Components/Button/BaseButton.test.tsx +149 -0
  208. package/src/lib/Components/Button/BaseButton.tsx +193 -148
  209. package/src/lib/Components/Button/Button.mdx +34 -31
  210. package/src/lib/Components/Button/Button.stories.tsx +37 -58
  211. package/src/lib/Components/Button/Button.tsx +4 -11
  212. package/src/lib/Components/Button/index.ts +1 -1
  213. package/src/lib/Components/Button/{BaseButton.types.ts → types.ts} +14 -8
  214. package/src/lib/Components/CardButton/CardButton.mdx +15 -25
  215. package/src/lib/Components/CardButton/CardButton.stories.tsx +48 -22
  216. package/src/lib/Components/CardButton/CardButton.test.tsx +141 -0
  217. package/src/lib/Components/CardButton/CardButton.tsx +142 -108
  218. package/src/lib/Components/CardButton/index.ts +1 -1
  219. package/src/lib/Components/CardButton/{CardButton.types.ts → types.ts} +4 -3
  220. package/src/lib/Components/Checkbox/Checkbox.mdx +1 -1
  221. package/src/lib/Components/Checkbox/Checkbox.test.tsx +42 -17
  222. package/src/lib/Components/Icon/Icon.stories.tsx +143 -73
  223. package/src/lib/Components/Icon/Icon.test.tsx +84 -0
  224. package/src/lib/Components/Icon/Icon.tsx +32 -28
  225. package/src/lib/Components/Icon/createIcon.ts +2 -3
  226. package/src/lib/Components/Icon/index.ts +1 -1
  227. package/src/lib/Components/Icon/{Icon.types.ts → types.ts} +4 -3
  228. package/src/lib/Components/IconButton/IconButton.mdx +13 -10
  229. package/src/lib/Components/IconButton/IconButton.stories.tsx +12 -14
  230. package/src/lib/Components/IconButton/IconButton.test.tsx +141 -0
  231. package/src/lib/Components/IconButton/IconButton.tsx +3 -13
  232. package/src/lib/Components/IconButton/index.ts +1 -0
  233. package/src/lib/Components/IconButton/types.ts +12 -0
  234. package/src/lib/Components/InteractiveIcon/InteractiveIcon.figma.tsx +1 -1
  235. package/src/lib/Components/InteractiveIcon/InteractiveIcon.mdx +25 -27
  236. package/src/lib/Components/InteractiveIcon/InteractiveIcon.stories.tsx +82 -43
  237. package/src/lib/Components/InteractiveIcon/InteractiveIcon.test.tsx +30 -19
  238. package/src/lib/Components/InteractiveIcon/InteractiveIcon.tsx +78 -45
  239. package/src/lib/Components/InteractiveIcon/types.ts +4 -7
  240. package/src/lib/Components/Link/Link.mdx +8 -18
  241. package/src/lib/Components/Link/Link.stories.tsx +56 -25
  242. package/src/lib/Components/Link/Link.test.tsx +141 -51
  243. package/src/lib/Components/Link/Link.tsx +128 -150
  244. package/src/lib/Components/Link/index.ts +1 -0
  245. package/src/lib/Components/Link/types.ts +44 -0
  246. package/src/lib/Components/Search/Search.mdx +14 -1
  247. package/src/lib/Components/Search/Search.stories.tsx +94 -15
  248. package/src/lib/Components/Select/Select.test.tsx +8 -4
  249. package/src/lib/Components/Select/Select.tsx +4 -31
  250. package/src/lib/Components/Spinner/Spinner.stories.tsx +1 -5
  251. package/src/lib/Components/Spinner/Spinner.tsx +60 -34
  252. package/src/lib/Components/Spinner/index.ts +1 -0
  253. package/src/lib/Components/Spinner/types.ts +15 -0
  254. package/src/lib/Components/Switch/Switch.mdx +1 -1
  255. package/src/lib/Components/Tag/Tag.stories.tsx +2 -2
  256. package/src/lib/Components/Tag/Tag.tsx +22 -6
  257. package/src/lib/Components/Tag/Tag.types.ts +7 -8
  258. package/src/lib/Components/TextInput/TextInput.mdx +24 -4
  259. package/src/lib/Components/TextInput/TextInput.stories.tsx +131 -15
  260. package/src/lib/Components/Tile/Tile.test.tsx +100 -63
  261. package/src/lib/Components/Tile/Tile.tsx +64 -13
  262. package/src/lib/Components/Tile/types.ts +14 -1
  263. package/src/lib/Components/Tooltip/Tooltip.stories.tsx +2 -2
  264. package/src/lib/Components/Tooltip/Tooltip.test.tsx +8 -4
  265. package/src/lib/Components/{Box → Utility/Box}/Box.mdx +15 -13
  266. package/src/lib/Components/{Box → Utility/Box}/Box.stories.tsx +13 -11
  267. package/src/lib/Components/{Box → Utility/Box}/Box.tsx +11 -12
  268. package/src/lib/Components/Utility/Box/index.ts +1 -0
  269. package/src/lib/Components/Utility/Pressable/Pressable.mdx +103 -0
  270. package/src/lib/Components/Utility/Pressable/Pressable.stories.tsx +51 -0
  271. package/src/lib/Components/Utility/Pressable/Pressable.test.tsx +221 -0
  272. package/src/lib/Components/Utility/Pressable/Pressable.tsx +34 -0
  273. package/src/lib/Components/Utility/Pressable/index.ts +2 -0
  274. package/src/lib/Components/Utility/Pressable/types.ts +3 -0
  275. package/src/lib/Components/{Text → Utility/Text}/Text.mdx +15 -7
  276. package/src/lib/Components/{Text → Utility/Text}/Text.stories.tsx +3 -3
  277. package/src/lib/Components/Utility/Text/Text.tsx +39 -0
  278. package/src/lib/Components/Utility/index.ts +3 -0
  279. package/src/lib/Components/index.ts +1 -3
  280. package/src/lib/utils/components/InjectStylesIntoChildren.tsx +23 -14
  281. package/src/styles/Provider/createStylesheetTheme.ts +0 -1
  282. package/src/styles/create/useCreate.ts +8 -4
  283. package/src/styles/factories/areLxPropsEqual.ts +32 -0
  284. package/src/styles/factories/createStyledPressable.test.tsx +253 -0
  285. package/src/styles/factories/createStyledPressable.tsx +97 -0
  286. package/src/styles/factories/createStyledText.test.tsx +28 -20
  287. package/src/styles/factories/createStyledText.tsx +29 -49
  288. package/src/styles/factories/createStyledView.test.tsx +22 -16
  289. package/src/styles/factories/createStyledView.tsx +19 -53
  290. package/src/styles/factories/index.ts +3 -0
  291. package/src/styles/index.ts +2 -3
  292. package/src/styles/resolveStyle/resolveConfig.ts +16 -15
  293. package/src/styles/resolveStyle/resolveStyle.test.ts +13 -141
  294. package/src/styles/resolveStyle/resolveStyle.ts +10 -60
  295. package/src/styles/types/create.types.ts +1 -1
  296. package/src/styles/types/styled.types.ts +73 -105
  297. package/src/styles/types/utility.types.ts +1 -0
  298. package/src/styles/utils/index.ts +1 -0
  299. package/src/styles/utils/mergeStyles.test.ts +45 -0
  300. package/src/styles/utils/mergeStyles.ts +25 -0
  301. package/.storybook/docs/getting-started/StyleSystem.mdx +0 -133
  302. package/dist/src/lib/Components/Box/Box.d.ts +0 -592
  303. package/dist/src/lib/Components/Box/Box.d.ts.map +0 -1
  304. package/dist/src/lib/Components/Box/Box.stories.d.ts.map +0 -1
  305. package/dist/src/lib/Components/Box/Box.types.d.ts +0 -3
  306. package/dist/src/lib/Components/Box/Box.types.d.ts.map +0 -1
  307. package/dist/src/lib/Components/Box/index.d.ts +0 -3
  308. package/dist/src/lib/Components/Box/index.d.ts.map +0 -1
  309. package/dist/src/lib/Components/Button/BaseButton.types.d.ts.map +0 -1
  310. package/dist/src/lib/Components/CardButton/CardButton.types.d.ts.map +0 -1
  311. package/dist/src/lib/Components/Icon/Icon.types.d.ts.map +0 -1
  312. package/dist/src/lib/Components/Text/Text.d.ts +0 -602
  313. package/dist/src/lib/Components/Text/Text.d.ts.map +0 -1
  314. package/dist/src/lib/Components/Text/Text.stories.d.ts.map +0 -1
  315. package/dist/src/lib/Components/Text/index.d.ts.map +0 -1
  316. package/dist/src/lib/Components/_ToRemove/ToRemove.d.ts +0 -9
  317. package/dist/src/lib/Components/_ToRemove/ToRemove.d.ts.map +0 -1
  318. package/dist/src/lib/Components/_ToRemove/ToRemove.js +0 -43
  319. package/dist/src/styles/utils/styleVarianceAuthority.d.ts +0 -30
  320. package/dist/src/styles/utils/styleVarianceAuthority.d.ts.map +0 -1
  321. package/dist/src/styles/utils/styleVarianceAuthority.js +0 -97
  322. package/src/lib/Components/Box/Box.types.ts +0 -3
  323. package/src/lib/Components/Box/index.ts +0 -2
  324. package/src/lib/Components/Text/Text.tsx +0 -35
  325. package/src/lib/Components/_ToRemove/ToRemove.tsx +0 -65
  326. package/src/styles/utils/styleVarianceAuthority.test.ts +0 -302
  327. package/src/styles/utils/styleVarianceAuthority.ts +0 -154
  328. /package/dist/src/lib/Components/{Box/Box.types.js → Button/types.js} +0 -0
  329. /package/dist/src/lib/Components/{Button/BaseButton.types.js → CardButton/types.js} +0 -0
  330. /package/dist/src/lib/Components/{CardButton/CardButton.types.js → Icon/types.js} +0 -0
  331. /package/dist/src/lib/Components/{Icon/Icon.types.js → IconButton/types.js} +0 -0
  332. /package/dist/src/lib/Components/{Box → Utility/Box}/Box.stories.d.ts +0 -0
  333. /package/dist/src/lib/Components/{Box → Utility/Box}/index.js +0 -0
  334. /package/dist/src/lib/Components/{Text → Utility/Text}/Text.stories.d.ts +0 -0
  335. /package/dist/src/lib/Components/{Text → Utility/Text}/index.d.ts +0 -0
  336. /package/dist/src/lib/Components/{Text → Utility/Text}/index.js +0 -0
  337. /package/src/lib/Components/{Text → Utility/Text}/index.ts +0 -0
@@ -0,0 +1,149 @@
1
+ import { describe, it, expect, jest } from '@jest/globals';
2
+ import { ledgerLiveThemes } from '@ledgerhq/lumen-design-core';
3
+ import { render, screen, fireEvent } from '@testing-library/react-native';
4
+ import React from 'react';
5
+ import { ViewStyle } from 'react-native';
6
+
7
+ import { Plus, Settings } from '../../Symbols';
8
+ import { ThemeProvider } from '../ThemeProvider/ThemeProvider';
9
+ import { BaseButton } from './BaseButton';
10
+
11
+ const renderWithProvider = (component: React.ReactElement) => {
12
+ return render(
13
+ <ThemeProvider themes={ledgerLiveThemes} colorScheme='dark' locale='en'>
14
+ {component}
15
+ </ThemeProvider>,
16
+ );
17
+ };
18
+
19
+ describe('BaseButton Component', () => {
20
+ describe('Rendering', () => {
21
+ it('should render with text content and correct accessibility role', () => {
22
+ renderWithProvider(<BaseButton testID='button'>Click me</BaseButton>);
23
+ const button = screen.getByTestId('button');
24
+ expect(button).toBeTruthy();
25
+ expect(screen.getByText('Click me')).toBeTruthy();
26
+ expect(button.props.accessibilityRole).toBe('button');
27
+ });
28
+ });
29
+
30
+ describe('Appearances', () => {
31
+ it.each([
32
+ 'base',
33
+ 'accent',
34
+ 'gray',
35
+ 'transparent',
36
+ 'no-background',
37
+ 'red',
38
+ ] as const)('should render with %s appearance', (appearance) => {
39
+ renderWithProvider(
40
+ <BaseButton testID='button' appearance={appearance}>
41
+ {appearance}
42
+ </BaseButton>,
43
+ );
44
+ expect(screen.getByTestId('button')).toBeTruthy();
45
+ });
46
+ });
47
+
48
+ describe('Sizes', () => {
49
+ it.each(['xs', 'sm', 'md', 'lg'] as const)(
50
+ 'should render with %s size',
51
+ (size) => {
52
+ renderWithProvider(
53
+ <BaseButton testID='button' size={size}>
54
+ {size}
55
+ </BaseButton>,
56
+ );
57
+ expect(screen.getByTestId('button')).toBeTruthy();
58
+ },
59
+ );
60
+ });
61
+
62
+ describe('Icons', () => {
63
+ it('should render with icon and text', () => {
64
+ renderWithProvider(
65
+ <BaseButton testID='button' icon={Plus}>
66
+ Add Item
67
+ </BaseButton>,
68
+ );
69
+ expect(screen.getByTestId('button')).toBeTruthy();
70
+ expect(screen.getByText('Add Item')).toBeTruthy();
71
+ });
72
+
73
+ it('should render as icon-only when no children provided', () => {
74
+ renderWithProvider(<BaseButton testID='button' icon={Settings} />);
75
+ expect(screen.getByTestId('button')).toBeTruthy();
76
+ });
77
+ });
78
+
79
+ describe('States', () => {
80
+ it('should be disabled when disabled prop is true', () => {
81
+ renderWithProvider(
82
+ <BaseButton testID='button' disabled>
83
+ Disabled
84
+ </BaseButton>,
85
+ );
86
+ const button = screen.getByTestId('button');
87
+ expect(button.props.accessibilityState.disabled).toBe(true);
88
+ });
89
+
90
+ it('should render loading state with spinner', () => {
91
+ renderWithProvider(
92
+ <BaseButton testID='button' loading>
93
+ Loading
94
+ </BaseButton>,
95
+ );
96
+ expect(screen.getByTestId('button')).toBeTruthy();
97
+ expect(screen.getByText('Loading')).toBeTruthy();
98
+ });
99
+
100
+ it('should render correctly with isFull prop', () => {
101
+ renderWithProvider(
102
+ <BaseButton testID='button' isFull>
103
+ Full Width
104
+ </BaseButton>,
105
+ );
106
+ const button = screen.getByTestId('base-button-content');
107
+ expect(button.props.style.width).toBe('100%');
108
+ });
109
+ });
110
+
111
+ describe('Interactions', () => {
112
+ it('should call onPress when pressed', () => {
113
+ const handlePress = jest.fn();
114
+ renderWithProvider(
115
+ <BaseButton testID='button' onPress={handlePress}>
116
+ Press me
117
+ </BaseButton>,
118
+ );
119
+
120
+ fireEvent.press(screen.getByTestId('button'));
121
+ expect(handlePress).toHaveBeenCalledTimes(1);
122
+ });
123
+
124
+ it('should not call onPress when disabled', () => {
125
+ const handlePress = jest.fn();
126
+ renderWithProvider(
127
+ <BaseButton testID='button' onPress={handlePress} disabled>
128
+ Disabled
129
+ </BaseButton>,
130
+ );
131
+
132
+ fireEvent.press(screen.getByTestId('button'));
133
+ expect(handlePress).not.toHaveBeenCalled();
134
+ });
135
+ });
136
+
137
+ describe('Styling', () => {
138
+ it('should apply custom style and lx props', () => {
139
+ const customStyle: ViewStyle = { marginTop: 16 };
140
+ renderWithProvider(
141
+ <BaseButton testID='button' style={customStyle} lx={{ padding: 's8' }}>
142
+ Styled
143
+ </BaseButton>,
144
+ );
145
+ const button = screen.getByTestId('button');
146
+ expect(button.props.style).toBeDefined();
147
+ });
148
+ });
149
+ });
@@ -1,118 +1,134 @@
1
- import { cva } from 'class-variance-authority';
2
- import React from 'react';
3
- import { Text, Pressable } from 'react-native';
4
- import { cn } from '../../utils';
1
+ import React, { FC, PropsWithChildren } from 'react';
2
+ import { Text, View } from 'react-native';
3
+ import { LumenStyleSheet, mergeStyles } from '../../../styles';
5
4
  import { IconSize } from '../Icon';
6
5
  import { Spinner } from '../Spinner';
7
- import { BaseButtonProps } from './BaseButton.types';
6
+ import { Pressable } from '../Utility';
7
+ import { BaseButtonProps } from './types';
8
8
 
9
- const buttonVariants = {
10
- root: cva(
11
- 'inline-flex size-fit flex-row items-center justify-center rounded-full transition-colors body-1-semi-bold',
12
- {
13
- variants: {
14
- appearance: {
15
- base: 'bg-interactive active:bg-interactive-pressed',
16
- gray: 'bg-muted active:bg-muted-pressed',
17
- accent: 'bg-accent active:bg-accent-pressed',
18
- transparent:
19
- 'bg-muted-transparent active:bg-muted-transparent-pressed',
20
- 'no-background': 'bg-transparent active:bg-base-transparent-pressed',
21
- red: 'bg-error active:bg-error-pressed',
22
- },
23
- size: {
24
- xs: 'px-12 py-8 body-2-semi-bold',
25
- sm: 'px-16 py-10 body-2-semi-bold',
26
- md: 'px-16 py-12',
27
- lg: 'p-16',
28
- },
29
- isFull: {
30
- true: 'w-full',
31
- },
32
- loading: {
33
- true: '',
34
- },
35
- iconOnly: {
36
- true: '',
37
- false: '',
38
- },
39
- disabled: {
40
- true: 'bg-disabled text-disabled active:bg-disabled',
41
- false: '',
42
- },
43
- },
44
- compoundVariants: [
45
- {
46
- size: 'xs',
47
- iconOnly: true,
48
- className: 'p-8',
49
- },
50
- {
51
- size: 'sm',
52
- iconOnly: true,
53
- className: 'p-12',
54
- },
55
- {
56
- size: 'md',
57
- iconOnly: true,
58
- className: 'p-12',
59
- },
60
- {
61
- size: 'lg',
62
- iconOnly: true,
63
- className: 'p-16',
64
- },
65
- {
66
- iconOnly: false,
67
- className: 'gap-8',
68
- },
69
- {
70
- appearance: 'no-background',
71
- disabled: true,
72
- className: 'bg-base-transparent',
9
+ type Appearance = NonNullable<BaseButtonProps['appearance']>;
10
+ type Size = NonNullable<BaseButtonProps['size']>;
11
+
12
+ const iconSizeMap: Record<Size, IconSize> = {
13
+ xs: 16,
14
+ sm: 20,
15
+ md: 24,
16
+ lg: 24,
17
+ } as const;
18
+
19
+ const useRootStyles = ({ isFull }: { isFull: boolean }) => {
20
+ return LumenStyleSheet.useCreate(
21
+ (t) => {
22
+ return {
23
+ root: {
24
+ width: isFull ? t.sizes.full : 'auto',
25
+ borderRadius: t.borderRadius.full,
73
26
  },
74
- ],
75
- defaultVariants: {
76
- appearance: 'base',
77
- size: 'md',
78
- isFull: false,
79
- iconOnly: false,
80
- disabled: false,
81
- },
27
+ };
82
28
  },
83
- ),
84
- label: cva('line-clamp-2 text-left text-inherit body-1-semi-bold', {
85
- variants: {
86
- appearance: {
87
- base: 'text-on-interactive',
88
- accent: 'text-on-accent',
89
- red: 'text-error',
90
- gray: 'text-base',
91
- 'no-background': 'text-base',
92
- transparent: 'text-base',
93
- },
94
- disabled: {
95
- true: 'text-disabled',
96
- },
97
- },
98
- }),
29
+ [isFull],
30
+ );
99
31
  };
100
32
 
101
- const iconVariants = cva('shrink-0', {
102
- variants: {
103
- appearance: {
104
- base: 'text-on-interactive',
105
- accent: 'text-on-accent',
106
- red: 'text-error',
107
- gray: 'text-base',
108
- 'no-background': 'text-base',
109
- transparent: 'text-base',
110
- },
111
- disabled: {
112
- true: 'text-disabled',
33
+ const useStyles = ({
34
+ appearance,
35
+ size,
36
+ disabled,
37
+ pressed,
38
+ iconOnly,
39
+ isFull,
40
+ }: {
41
+ appearance: Appearance;
42
+ size: Size;
43
+ disabled: boolean;
44
+ pressed: boolean;
45
+ iconOnly: boolean;
46
+ isFull: boolean;
47
+ }) => {
48
+ return LumenStyleSheet.useCreate(
49
+ (t) => {
50
+ const bgColors: Record<Appearance, string> = {
51
+ base: t.colors.bg.interactive,
52
+ gray: t.colors.bg.muted,
53
+ accent: t.colors.bg.accent,
54
+ transparent: t.colors.bg.mutedTransparent,
55
+ 'no-background': 'transparent',
56
+ red: t.colors.bg.error,
57
+ };
58
+
59
+ const pressedBgColors: Record<Appearance, string> = {
60
+ base: t.colors.bg.interactivePressed,
61
+ gray: t.colors.bg.mutedPressed,
62
+ accent: t.colors.bg.accentPressed,
63
+ transparent: t.colors.bg.mutedTransparentPressed,
64
+ 'no-background': t.colors.bg.baseTransparentPressed,
65
+ red: t.colors.bg.errorPressed,
66
+ };
67
+
68
+ const textColors: Record<Appearance, string> = {
69
+ base: t.colors.text.onInteractive,
70
+ accent: t.colors.text.onAccent,
71
+ red: t.colors.text.error,
72
+ gray: t.colors.text.base,
73
+ 'no-background': t.colors.text.base,
74
+ transparent: t.colors.text.base,
75
+ };
76
+
77
+ const sizeStyles: Record<Size, { paddingH: number; paddingV: number }> = {
78
+ xs: { paddingH: t.spacings.s12, paddingV: t.spacings.s8 },
79
+ sm: { paddingH: t.spacings.s16, paddingV: t.spacings.s10 },
80
+ md: { paddingH: t.spacings.s16, paddingV: t.spacings.s12 },
81
+ lg: { paddingH: t.spacings.s16, paddingV: t.spacings.s16 },
82
+ };
83
+
84
+ const iconOnlyPadding: Record<Size, number> = {
85
+ xs: t.spacings.s8,
86
+ sm: t.spacings.s10,
87
+ md: t.spacings.s12,
88
+ lg: t.spacings.s16,
89
+ };
90
+
91
+ const typography =
92
+ size === 'xs' || size === 'sm'
93
+ ? t.typographies.body2SemiBold
94
+ : t.typographies.body1SemiBold;
95
+
96
+ const currentSizeStyle = sizeStyles[size];
97
+
98
+ return {
99
+ container: mergeStyles(
100
+ {
101
+ flexDirection: 'row',
102
+ alignItems: 'center',
103
+ justifyContent: 'center',
104
+ backgroundColor: bgColors[appearance],
105
+ },
106
+ iconOnly
107
+ ? { padding: iconOnlyPadding[size] }
108
+ : {
109
+ paddingHorizontal: currentSizeStyle.paddingH,
110
+ paddingVertical: currentSizeStyle.paddingV,
111
+ gap: t.spacings.s8,
112
+ },
113
+ isFull && { width: t.sizes.full },
114
+ pressed && { backgroundColor: pressedBgColors[appearance] },
115
+ disabled && { backgroundColor: t.colors.bg.disabled },
116
+ appearance === 'no-background' &&
117
+ disabled && { backgroundColor: 'transparent' },
118
+ ),
119
+ label: mergeStyles(typography, {
120
+ color: disabled ? t.colors.text.disabled : textColors[appearance],
121
+ textAlign: 'left',
122
+ }),
123
+ icon: {
124
+ flexShrink: 0,
125
+ color: disabled ? t.colors.text.disabled : textColors[appearance],
126
+ },
127
+ };
113
128
  },
114
- },
115
- });
129
+ [appearance, size, disabled, pressed, iconOnly, isFull],
130
+ );
131
+ };
116
132
 
117
133
  /**
118
134
  * Base button component
@@ -125,66 +141,95 @@ export const BaseButton = React.forwardRef<
125
141
  >(
126
142
  (
127
143
  {
128
- className,
144
+ lx,
145
+ style,
129
146
  children,
130
147
  appearance = 'base',
131
148
  size = 'md',
132
- isFull,
133
- loading,
149
+ isFull = false,
150
+ loading = false,
134
151
  icon: IconProp,
135
- disabled,
152
+ disabled = false,
136
153
  ...props
137
154
  },
138
155
  ref,
139
156
  ) => {
140
- const iconOnly = Boolean(IconProp && !children);
141
-
142
- const iconSizeMap: { [key: string]: IconSize } = {
143
- xs: 16,
144
- sm: 20,
145
- md: 24,
146
- lg: 24,
147
- };
148
-
149
- const calculatedIconSize = size ? iconSizeMap[size] : 24;
157
+ const rootStyles = useRootStyles({ isFull });
150
158
 
151
159
  return (
152
160
  <Pressable
153
161
  ref={ref}
154
- className={cn(
155
- className,
156
- buttonVariants.root({
157
- appearance,
158
- size,
159
- isFull,
160
- loading,
161
- iconOnly,
162
- disabled,
163
- }),
164
- )}
165
- disabled={disabled ?? false}
162
+ lx={lx}
163
+ style={[style, rootStyles.root]}
164
+ disabled={disabled}
165
+ accessibilityRole='button'
166
+ accessibilityState={{ disabled }}
166
167
  {...props}
167
168
  >
168
- {loading && (
169
- <Spinner
170
- size={calculatedIconSize}
171
- className={iconVariants({ appearance, disabled })}
172
- />
173
- )}
174
- {!loading && IconProp && (
175
- <IconProp
176
- size={calculatedIconSize}
177
- className={iconVariants({ appearance, disabled })}
178
- />
179
- )}
180
- {children && (
181
- <Text className={buttonVariants.label({ appearance, disabled })}>
169
+ {({ pressed }) => (
170
+ <BaseButtonContent
171
+ appearance={appearance}
172
+ size={size}
173
+ disabled={disabled}
174
+ pressed={pressed}
175
+ isFull={isFull}
176
+ loading={loading}
177
+ IconProp={IconProp}
178
+ >
182
179
  {children}
183
- </Text>
180
+ </BaseButtonContent>
184
181
  )}
185
182
  </Pressable>
186
183
  );
187
184
  },
188
185
  );
189
186
 
187
+ type BaseButtonContentProps = PropsWithChildren<{
188
+ appearance: Appearance;
189
+ size: Size;
190
+ disabled: boolean;
191
+ pressed: boolean;
192
+ isFull: boolean;
193
+ loading: boolean;
194
+ IconProp?: BaseButtonProps['icon'];
195
+ }>;
196
+
197
+ const BaseButtonContent: FC<BaseButtonContentProps> = ({
198
+ appearance,
199
+ size,
200
+ disabled,
201
+ pressed,
202
+ isFull,
203
+ loading,
204
+ IconProp,
205
+ children,
206
+ }) => {
207
+ const calculatedIconSize = iconSizeMap[size];
208
+ const iconOnly = Boolean(IconProp && !children);
209
+ const styles = useStyles({
210
+ appearance,
211
+ size,
212
+ disabled,
213
+ pressed,
214
+ iconOnly,
215
+ isFull,
216
+ });
217
+
218
+ return (
219
+ <View style={styles.container} testID='base-button-content'>
220
+ {loading && (
221
+ <Spinner size={calculatedIconSize} color={styles.icon.color} />
222
+ )}
223
+ {!loading && IconProp && (
224
+ <IconProp size={calculatedIconSize} style={styles.icon} />
225
+ )}
226
+ {children && (
227
+ <Text style={styles.label} numberOfLines={2}>
228
+ {children}
229
+ </Text>
230
+ )}
231
+ </View>
232
+ );
233
+ };
234
+
190
235
  BaseButton.displayName = 'BaseButton';
@@ -4,6 +4,7 @@ import { Button } from './Button';
4
4
  import { CustomTabs, Tab } from '../../../../.storybook/components';
5
5
  import { DoVsDontRow, DoBlockItem, DontBlockItem } from '../../../../.storybook/components/DoVsDont';
6
6
  import CommonRulesDoAndDont from '../../../../.storybook/docs/CommonRulesDoAndDont.mdx';
7
+ import { Box } from '../Utility';
7
8
 
8
9
  <Meta title='Action/Button' of={ButtonStories} />
9
10
 
@@ -60,23 +61,14 @@ Buttons' contents can be of two types:
60
61
 
61
62
  Buttons come in four different sizes:
62
63
 
63
- - S (**40 px** tall)
64
- - M (default, **48 px** tall)
65
- - L (**56 px** tall)
64
+ - `sm` (**40px**)
65
+ - `md` (**48px**, default)
66
+ - `lg` (**56px**)
66
67
 
67
- > Note: For XS size (32 px tall), use the [IconButton](/docs/action-iconbutton--docs) component instead.
68
+ > Note: For `xs` size (32 px), use the [IconButton](/docs/action-iconbutton--docs) component instead.
68
69
 
69
70
  <Canvas of={ButtonStories.SizesShowcase} />
70
71
 
71
- > **⚠️ Important**: Icon sizes are automatically managed by the Button component based on the selected size. Never override the icon size using className or style props, as this will break the visual consistency of the design system. The Button component ensures proper scaling and alignment of icons across all sizes.
72
- >
73
- > ```tsx
74
- > // ✅ Correct: Let Button handle icon sizing
75
- > <Button size="sm" icon={Settings} accessibilityLabel="Settings">Settings</Button>
76
- >
77
- > // ❌ Wrong: Don't override icon size [it's not gonna work even if you try]
78
- > <Button size="sm" icon={Settings} className="w-6 h-6" accessibilityLabel="Settings">Settings</Button>
79
- > ```
80
72
 
81
73
  ### States
82
74
 
@@ -90,7 +82,7 @@ Buttons dynamically adapt their width to the size of their content, while keepin
90
82
 
91
83
  When a label is too long, it's truncated to 2 lines, with a maximum width of the button's container:
92
84
 
93
- <Canvas of={ButtonStories.ResponsiveLayout2} />
85
+ <Canvas of={ButtonStories.LabelTruncate} />
94
86
 
95
87
  > The Button must dynamically resize to its container constraints.
96
88
 
@@ -130,13 +122,26 @@ function MyComponent() {
130
122
 
131
123
  ### Custom Styling
132
124
 
133
- While the component comes with predefined styles, you can extend them using NativeWind classes:
125
+ While the component comes with predefined styles, you can extend them using the `lx` prop for token-based styling:
134
126
 
135
127
  ```tsx
136
128
  <Button
137
129
  size='md'
138
130
  appearance='base'
139
- className='mt-4' // Custom margin top
131
+ lx={{ marginTop: 's4' }} // Custom margin top using design tokens
132
+ onPress={() => {}}
133
+ >
134
+ Custom Button
135
+ </Button>
136
+ ```
137
+
138
+ You can also use the `style` prop for escape-hatch styling when needed:
139
+
140
+ ```tsx
141
+ <Button
142
+ size='md'
143
+ appearance='base'
144
+ style={{ marginTop: 16 }} // Raw style values
140
145
  onPress={() => {}}
141
146
  >
142
147
  Custom Button
@@ -207,12 +212,13 @@ The Button component is built on React Native's `Pressable` and accepts all its
207
212
 
208
213
  The following guidelines are based on our [Button Component API Design ADR](https://ledgerhq.atlassian.net/wiki/spaces/DLS/pages/6003949581/ADR-001+Button+Component+API+Design). These decisions were made to ensure consistency, maintainability, and proper implementation of our design system principles.
209
214
 
210
- <div className='flex flex-col gap-24'>
215
+ <Box lx={{ flexDirection: 'column', gap: 's24' }}>
211
216
  <DoVsDontRow>
212
- <DoBlockItem
213
- title='Use icon prop'
214
- description='Pass icon as a component reference for proper sizing and alignment'
215
- >
217
+ <DoBlockItem
218
+ title='Use icon prop'
219
+ description='Pass icon as a component reference for proper sizing and alignment'
220
+ >
221
+
216
222
 
217
223
  {/* prettier-ignore */}
218
224
  ```tsx
@@ -291,13 +297,13 @@ import { Settings } from '@ledgerhq/lumen-ui-rnative/symbols';
291
297
 
292
298
  </DoBlockItem>
293
299
  <DontBlockItem
294
- title="Don't use className for width"
295
- description='Avoid using className to control button width'
300
+ title="Don't use style for full width"
301
+ description='Avoid using style to control button width'
296
302
  >
297
303
 
298
304
  {/* prettier-ignore */}
299
305
  ```tsx
300
- <Button className='w-full' onPress={() => {}}>
306
+ <Button style={{ width: '100%' }} onPress={() => {}}>
301
307
  Full Width
302
308
  </Button>
303
309
  ```
@@ -331,13 +337,10 @@ import { Settings } from '@ledgerhq/lumen-ui-rnative/symbols';
331
337
  Clickable Looking Button
332
338
  </Button>
333
339
  ```
334
-
335
- </DontBlockItem>
336
-
337
- </DoVsDontRow>
338
-
339
- <CommonRulesDoAndDont />
340
- </div>
340
+ </DontBlockItem>
341
+ </DoVsDontRow>
342
+ <CommonRulesDoAndDont />
343
+ </Box>
341
344
 
342
345
  ## Platform Considerations
343
346