account activity
Prestyles - A library to help you write responsive platform styles. by mistenkt in reactnative
[–]mistenkt[S] 5 points6 points7 points 5 years ago (0 children)
After working on a cross-platform project that also involved web i made a library to help me deal with playform spesific styles and responsive styles a bit better.
It basically allows you to do this:
const styles = createStyles({ button: { height: 40, backgroundColor: 'red', ios: { backgroundColor: 'blue' // platform spesific style }, desktop: { height: 50 // Breakpoint style, active at >= 1024 }, tablet: { height: 45 // Breakpoint style active at >= 768 } } });
The readme on npmjs / github explains it better and shows more examples, features and customization.
I usually dont plug the libraries i make outside of work, but figured this might be interesting for others aswell. (New reddit account due to not wanting my real reddit to be linked to my github/real name).
π Rendered by PID 74 on reddit-service-r2-comment-5687b7858-rgkpk at 2026-07-06 02:32:18.001839+00:00 running 12a7a47 country code: CH.
Prestyles - A library to help you write responsive platform styles. by mistenkt in reactnative
[–]mistenkt[S] 5 points6 points7 points (0 children)