Skip to content

Commit 02c2dba

Browse files
roryabrahamOSBotify
authored andcommitted
Merge pull request #71081 from Expensify/revert-70261-perf/migration-to-stylesheet
Revert "[No QA] Migrate static styles to use StyleSheet.create" (cherry picked from commit 9826018) (cherry-picked to staging by roryabraham)
1 parent 197ef9c commit 02c2dba

File tree

2 files changed

+598
-617
lines changed

2 files changed

+598
-617
lines changed

contributingGuides/STYLING.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@
44

55
Styles can either be theme-related or not. "Theme-related" means that a style contains some sort of color attributes (backgroundColor, color, borderColor). "Non-theme-related" styles may not contain no color attributes.
66

7-
All non-theme-related styles must be defined in the `/styles` directory and `styles.js` contains the final export after gathering all appropriate styles. There are also many helper styles available for direct use in components.
8-
9-
The styles are grouped into:
10-
- `staticStyles` - object wrapped into `StyleSheet.create()` which contains static styles based on the `theme`.
11-
- `dynamicStyles` - object that contains functions which return dynamic styles
7+
All non-theme-related styles must be defined in the `/styles` directory and `styles.js` contains the final export after gathering all appropriate styles. Unlike some React Native applications, we are not using `StyleSheet.create()` and instead store styles as plain JS objects. There are also many helper styles available for direct use in components.
128

139
All styles that contain theme colors have to be defined in the `ThemeStylesProvider` component, as those need to be dynamically created and animated.
1410

0 commit comments

Comments
 (0)