Skip to content
This repository has been archived by the owner on Apr 16, 2021. It is now read-only.

Remove styles folder #6

Open
ssomnoremac opened this issue May 1, 2017 · 3 comments
Open

Remove styles folder #6

ssomnoremac opened this issue May 1, 2017 · 3 comments
Labels

Comments

@ssomnoremac
Copy link

I haven't seen all too many RN apps use global styles. The style folder is a vestige from the web project you can leave behind. I'd suggest creating an example component in the component folder with example stylesheet usage.

@wswoodruff
Copy link
Owner

I just added some styles helpers in the styles/index.js file. The function addStyleHelpers provides an hoc that manages styles composition cascade order, there's an example of it's use in src/screens/home/components/HomeView.js, this also is now described in the README [here]

@ssomnoremac
Copy link
Author

ssomnoremac commented May 1, 2017 via email

@wswoodruff
Copy link
Owner

wswoodruff commented May 5, 2017

The index.js of the styles folder has some inheritance helpers for styles, so that styles can be scoped easier. If you wrap your component in gStyles.addStyleHelpers(MenuItemDetail, lStyles) -- lStyles is local styles, which override the global styles. It's just a helper to Object.assign them all. The order is global styles -> passed-in styles from parent via styles prop -> local styles.

jdonisvitch pushed a commit to jdonisvitch/strangeluv-native that referenced this issue Dec 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants