# 获取主题信息

useThemeContext 可返回当前主题数据,数据类型为 ThemeData,包含 colorMode 颜色模式、appTheme APP 主题、theme 业务主题

# Class 组件用法

import { Component } from 'react';
import { injectTheme } from '@ezviz/rntheme'
 
class DeviceButton extends Component {
  constructor() {
    super();
  }
 
  render() {
    const themeContext = this.props.rntheme.useThemeContext();
    console.log(themeContext);  // {"appTheme": "blue", "colorMode": "light", "theme": "bule_light"}
 
    return null;
  }
}
 
export default injectTheme(DeviceButton);

# Function 组件用法

import { useThemeContext } from '@ezviz/rntheme'
 
export default props => {
  const themeContext = useThemeContext();
  console.log(themeContext);  // {"appTheme": "blue", "colorMode": "light", "theme": "bule_light"}
   
  return null
}