小编Ruc*_*Ray的帖子

如何在 Chakra UI 中制作自定义大小的模态

我想在 React js 的 chakra UI 中创建自定义大小的模态。模态应该具有宽度 1000px 和高度 800px 我尝试使用主题创建自定义大小的模态,其中我覆盖了模态的 xl 大小,但它不起作用

const theme = extendTheme({
  breakpoints,
  config,
  fonts: {
    heading: "Nunito",
    body: "Nunito",
  },
  components:{
Modal:{
  sizes:{
    xl:{     
        h:"600px",
        w:'1000px',
      },     
    }
  }
}
},
  colors: {
    yellow: {
      100: "#FFBE17",
    },
    green: {
      100: "#45C79B",
    },
    red: {
      100: "#E8736F",
    },
   
    gray: {
      100: "#D1D1D1",
      200:'#E5E5E5',
      300:"#C4C4C4"
    },
  },
});
Run Code Online (Sandbox Code Playgroud)

 components:{
Modal:{
  sizes:{
    xl:{
      h:"600px",
      w:'1000px',
     
    }
  }
}
Run Code Online (Sandbox Code Playgroud)

reactjs chakra-ui

11
推荐指数
2
解决办法
2万
查看次数

我正在尝试在 netlify 上托管我的 React 网站,但出现此 npm 安装错误

如果我npm run build在本地运行命令并将文件夹拖放build到 netlify 中,那么它会被托管,但会出现这个大错误。

当我尝试从我的 github 存储库进行持续部署时。这是开头显示的错误

11:51:47 PM: npm WARN deprecated core-js@2.6.12: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
11:54:08 PM: npm ERR! code 1
11:54:08 PM: npm ERR! path /opt/build/repo/node_modules/node-sass …
Run Code Online (Sandbox Code Playgroud)

npm reactjs netlify netlify-cli

2
推荐指数
1
解决办法
5658
查看次数

标签 统计

reactjs ×2

chakra-ui ×1

netlify ×1

netlify-cli ×1

npm ×1