imobile_for_reactnative
Version:
iMobile for ReactNative,是SuperMap iMobile推出的一款基于React-Native框架的移动应用开发工具。基于该开发工具,用户可以使用JavaScript开发语言,开发出在Android和IOS操作系统下运行的原生移动GIS应用,入门门槛低,一次开发,处处运行。
103 lines (83 loc) • 1.94 kB
text/typescript
import { ImageStyle, Platform, TextStyle, ViewStyle } from 'react-native'
import { dp } from '../../../utils/size'
const LANDSCAPE_WIDTH = dp(300)
export const Color = {
/** Container 灰白色背景色 */
Background_Container: '#F6F7F8',
/** 页面背景,二级背景 */
Background_Page: '#FFFFFF',
/** 不可选时的灰色背景色 */
Background_Disabled: '#CCCCCC',
BLACK: 'black',
BLUE: '#1296db',
/** toolbar 底栏及与底栏相连的 view 的背景色 */
Toolbar_Bottom: '#FFFFFF',
GRAY: '#959595',
/** 搜索文字 */
Text_Search: '#CECECE',
LIGHT_GRAY: '#EBEBEB',
/** 浅色文字 */
Text_Light: '#707070',
WHITE: '#FFFFFF',
/** 深色文字 */
Text_Dark: '#1B1B1B',
}
export const h1: TextStyle = {
fontSize: dp(18),
color: Color.BLACK,
}
export const h2: TextStyle = {
fontSize: dp(14),
color: Color.BLACK,
}
export const h2c: TextStyle = {
...h2,
textAlign: 'center'
}
export const h3: TextStyle = {
fontSize: dp(12),
color: Color.BLACK,
}
export const h3c: TextStyle = {
...h3,
textAlign: 'center'
}
/** @deprecated 使用 AppStyle.h2c */
export const Text_Style_Center: TextStyle = h2c
/** @deprecated */
export const Text_Style_Small_Center: TextStyle = {
...h3,
textAlign: 'center',
fontSize: dp(10)
}
/** 悬浮风格 */
export const FloatStyle: ViewStyle = Platform.select({
android: {
elevation: 3
},
ios: {
shadowOffset: { width: 0, height: 0 },
shadowColor: '#eee',
shadowOpacity: 1,
shadowRadius: 2,
}
}) || {}
export const Image_Style: ImageStyle = {
width: dp(25),
height: dp(25),
}
export const Image_Style_Small: ImageStyle = {
width: dp(18),
height: dp(18),
}
/** list item 通用风格, 无分割线 */
export const ListItemStyleNS: ViewStyle = {
height: dp(47),
marginLeft: dp(20),
paddingRight: dp(16),
flexDirection: 'row',
alignItems: 'center'
}
export {
LANDSCAPE_WIDTH
}