{"size": 1818, "ext": "js", "max_stars_repo_path": "CJUIKitReactNativeDemo/uihome/theme/TSThemePage.js", "max_stars_repo_name": "dvlproad/CJUIKit-ReactNative", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "CJUIKitReactNativeDemo/uihome/theme/TSThemePage.js", "max_issues_repo_name": "dvlproad/CJUIKit-ReactNative", "max_issues_repo_issues_event_min_datetime": "2019-12-09T13:38:29.000Z", "max_issues_repo_issues_event_max_datetime": "2021-09-01T06:29:09.000Z", "max_forks_repo_path": "CJUIKitReactNativeDemo/uihome/theme/TSThemePage.js", "max_forks_repo_name": "dvlproad/CJUIKit-ReactNative", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 4, "max_forks_count": null, "avg_line_length": 29.8032786885, "max_line_length": 86, "alphanum_fraction": 0.3938393839}
/**
 * TSThemePage.js
 *
 * @Description: 切换主题的视图
 *
 * @author      chaoqian.li
 * @date        2019-12-18 14:18:38
 */
import React, { Component } from 'react';

import {
    CJTSTableHomeBasePage,
    CJTSNavigationFactory,
    CJTSRoute,
} from "cjrn-demo-base";

import {
    CQTheme,
} from "cjrn-theme-uikit";

export default class TSThemePage extends CJTSTableHomeBasePage {
    static navigationOptions = ({ navigation }) => {
        return CJTSNavigationFactory.backPageNavigationOptions({ navigation }, `切换主题`)
    };

    constructor(props) {
        super(props);

        this.state = {
            sectionDataModels: [
                {
                    key: "切换主题",
                    data: [
                        {
                            title: "default 风格",
                            clickButtonHandle: (moduleModel) => {
                                CQTheme.set(CQTheme.themes['default']);
                                CJTSRoute.pop(props.navigation);
                            },
                        },
                        // {
                        //     title: "Employee 风格",
                        //     clickButtonHandle: (moduleModel) => {
                        //         CQTheme.set(CQTheme.themes['Employee']);
                        //         CJTSRoute.pop(props.navigation);
                        //     },
                        // },
                        {
                            title: "Partner 风格",
                            clickButtonHandle: (moduleModel) => {
                                CQTheme.set(CQTheme.themes['Partner']);
                                CJTSRoute.pop(props.navigation);
                            },
                        },
                    ]
                },
            ]
        }
    }
}
