import React, { useEffect } from "react";
import { useDidShow, useDidHide } from "@tarojs/taro";
import { ConfigProvider } from "@nutui/nutui-react-taro";
// 全局样式
import "./app.scss";

function App(props: { children: React.ReactNode }) {
  const darkTheme = {
    nutuiColorPrimary: "#606cd2",
    nutuiColorPrimaryStop1: "#606cd2",
    nutuiColorPrimaryStop2: "#606cd2",
    "--nutui-tabs-tabpane-padding": "0",
    "--nutui-button-primary-disabled": "#b3b9e9",
    "--nutui-color-primary-disabled": "#b3b9e9",
    "--nutui-input-border-bottom-width": "2px",
  };
  // 可以使用所有的 React Hooks
  useEffect(() => {});

  // 对应 onShow
  useDidShow(() => {});

  // 对应 onHide
  useDidHide(() => {});

  return <ConfigProvider theme={darkTheme}>{props.children}</ConfigProvider>;
}

export default App;
