Titanium Ilmenite (WIP)
Titanium style loader with built in conditional statements for platform, form factor, width, height and more. Built to work with react-titanium but works with Titanium/Alloy thanks to titaniumifier. This is still a WIP and as such the API is subject to change.
Installation
Currently this only works as a commonjs package, I haven't tested the Titanium module yet.
npm install ilmenite --save
Usage - Titianium/Alloy
var buttonStyles = wrapper: layout: 'horizontal' width: TiUISIZE base: width: 100 height: 40 backgroundColor: 'gray' '[platform=ios]': // ios specific styles style: TiUIiPhoneSystemButtonStyleBORDERED '[formFactor=tablet]': // tablet specific styles width: 140 height: 60 '[formFactor=handheld height>=500]': // taller phones height: 50 success: backgroundColor: 'green' fail: backgroundColor: 'red' // new viewvar successButton = TiUI; // existing viewsuccessButton;
Usage - react-titanium
;;;; { return <view ... backgroundColor='blue' > <button ... /> </view> ; }