css.js 5 KB
import {Dimensions, StyleSheet} from 'react-native';
const  primary="#39f";
import {xnToast,getHeaderHeight,getHeaderPadding,getFooterBottom,xnBorderWidth} from "../utils/utils";


const mainCss = StyleSheet.create({

  body:{
    flex: 1,
    flexDirection: 'column',
    backgroundColor:"#fff"
  },
  main :{
    flex: 1
  },
  tabIcon:{
    flex: 1,
    width: 20,
    height: 20,
    marginBottom:0,
    paddingBottom:0,
  },
  //基础样式

  xnPlr:{
    paddingLeft:15,
    paddingRight:15,
  },
  xnPt:{
    paddingTop:15,
  },
  xnPb:{
    paddingBottom:15,
  },
  xnPl:{
    paddingLeft:15,
  },
  xnPr:{
    paddingRight:15,
  },
  xnMt:{
    marginTop:15,
  },
  xnMb:{
    marginBottom:15,
  },
  xnMl:{
    marginLeft:15,
  },
  xnMr:{
    marginRight:15,
  },

  //列表
  xnRowLayout:{
    borderTopWidth:xnBorderWidth(),
    borderTopColor:"#d9d9d9",
  },
  xnRow:{
    flexDirection:"row",
    alignItems:"center",
    backgroundColor:"#fff",
    marginLeft:15,
    paddingLeft:0,
    paddingRight:15,
    paddingTop:10,
    paddingBottom:10,
    borderBottomWidth:xnBorderWidth(),
    borderBottomColor:"#d9d9d9",
  },
  xnRowPL:{
    marginLeft:0,
    paddingLeft:15,
  },
  xnRowhd:{
    justifyContent:"center",
    minHeight:24,
    marginRight:10,
  },
  xnRowhdText:{
    color:"#333",
    fontSize:14,
  },
  xnRowbd:{
    flex:1,
    justifyContent:"center",
    minHeight:24,
  },
  xnRowbdText:{
    color:"#333",
    fontSize:14,
  },
  xnRowfd:{
    justifyContent:"center",
    minHeight:24,
    alignItems:"flex-end"
  },
  xnRowfdText:{
    color:"#999",
    fontSize:14,
  },
  xnRowLink:{
    width:8,
    height:8,
    borderTopWidth:1,
    borderTopColor:"#666",
    borderRightWidth:1,
    borderRightColor:"#666",
    transform:[
      {rotate:'45deg'},
    ],
  },
  xnRowIcon:{
    width:24,
    height:24
  },
  xnRowImgSm:{
    width:30,
    height:30,
    backgroundColor:"#dfdfdf"
  },
  xnRowImg:{
    width:60,
    height:60,
  },
  xnRowTitleText:{
    fontSize:16,
    color:"#000000",
    paddingTop:0 ,
    paddingBottom:2
  },
  xnRowInfo:{
    color:"#999",
    fontSize:12,
  },
  xnRowAlignSelf:{
    alignSelf:"flex-start"
  },
  xnColumnLayout:{
    borderTopWidth:xnBorderWidth(),
    borderTopColor:"#d9d9d9",
  },
  xnColumn:{
    backgroundColor:"#fff",
    borderBottomWidth:xnBorderWidth(),
    borderBottomColor:"#d9d9d9",
    marginLeft:15,
    marginRight:15,
  },
  xnColumnhd:{
    paddingTop:10,
    paddingBottom:10,

  },
  xnColumnTiTle:{
    fontSize:16,
    color:"#000000",
    paddingTop:0 ,
  },
  xnColumnbd:{
    height:(Dimensions.get('window').width-30)/3*2,
    width:Dimensions.get('window').width-30,

  },
  xnColumnImg:{
    height:(Dimensions.get('window').width-30)/3*2,
    width:Dimensions.get('window').width-30
  },
  xnColumnfd:{
    flexDirection:"row",
    paddingTop:10,
    paddingBottom:10,
    justifyContent:"space-between",
    alignItems:"center"
  },
  xnColumnfdText:{
    color:"#999",
    fontSize:12
  },

  //按钮
  xnBtn:{
    borderRadius:4,
    justifyContent:"center",
    alignItems:"center"
  },
  btnBg:{
    height:44,
  },
  btnBgText:{
    fontSize:18,
  },
  btnSm:{
    height:30,
    paddingLeft:15,
    paddingRight:15,
  },
  btnSmText:{
    fontSize:12,
  },
  btnDefault:{
    backgroundColor:"#fbfafc",
    borderColor:"#d6d5d6",
    borderWidth:xnBorderWidth(),
  },
  btnDefaultText:{
    color:"#000000",
  },
  btnPrimary:{
    backgroundColor:"#fff",
    borderColor:"#000000",
    borderWidth:xnBorderWidth(),
  },
  btnPrimaryText:{
    color:"#000000",
  },
  btnMinor:{
    backgroundColor:"#dfdfdf",
    borderColor:"#bfbfbf",
    borderWidth:xnBorderWidth(),
  },
  btnMinorText:{
    color:"#7a7a7a",
  } ,
  btnSuccess:{
    backgroundColor:"#09bb07",
    borderColor:"#029400",
    borderWidth:xnBorderWidth(),
  },
  btnSuccessText:{
    color:"#fff",
  },
  btnDanger:{
    backgroundColor:"#e94f4f",
    borderColor:"#d64949",
    borderWidth:xnBorderWidth(),
  },
  btnDangerText:{
    color:"#fff",
  },
  btnLink:{
    backgroundColor:"transparent",
    borderColor:"transparent",
    borderWidth:xnBorderWidth(),
  },
  btnLinkText:{
    color:"#000",
  },
  btnDisable:{
    opacity:0.3
  },
  xnBtnLayout:{

    justifyContent:"center",
    alignItems:"center",
    flexDirection:"row"
  },



//搜索
  xnSearchLayout:{
    padding:7,
    backgroundColor:'#efeff4',
    flexDirection:"row",
    justifyContent:'center',
    alignItems:'center',
  },
  searchBox:{
    flex:1,
    backgroundColor:'#fff',
    justifyContent:'center',
    alignItems:'center',
    flexDirection:'row',
    height:30,
    padding:8,
    borderRadius:4
  },
  searchIcon:{
    width:16,
    height:16,
    marginRight:10
  },
  searchPlaceholder:{
    fontSize:14,
  },
  searchInput:{
    padding:0,
    flex:1,
    color:"#333",
    width:50,
    fontSize:14,
    height:30,
    alignItems:'center',
    alignContent:'center',
    flexWrap:"nowrap",
  },
  searchCancel:{
    paddingLeft:10,
  },
  searchCancelText:{
    color:"#39f",
    fontSize:14,
  }

});

export default mainCss;