Change antd primary-color.

This commit is contained in:
Yang Luo 2021-03-26 23:18:24 +08:00
parent 437289438f
commit 3bcc292da2
5 changed files with 5621 additions and 4827 deletions

17
web/craco.config.js Normal file
View File

@ -0,0 +1,17 @@
const CracoLessPlugin = require('craco-less');
module.exports = {
plugins: [
{
plugin: CracoLessPlugin,
options: {
lessLoaderOptions: {
lessOptions: {
modifyVars: { '@primary-color': 'rgb(45,120,213)' },
javascriptEnabled: true,
},
},
},
},
],
};

View File

@ -4,27 +4,29 @@
"private": true, "private": true,
"dependencies": { "dependencies": {
"@ant-design/icons": "^4.2.2", "@ant-design/icons": "^4.2.2",
"@craco/craco": "^6.1.1",
"@testing-library/jest-dom": "^4.2.4", "@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2", "@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2", "@testing-library/user-event": "^7.1.2",
"antd": "^4.7.2", "antd": "^4.7.2",
"copy-to-clipboard": "^3.3.1", "copy-to-clipboard": "^3.3.1",
"craco-less": "^1.17.1",
"i18next": "^19.8.9", "i18next": "^19.8.9",
"moment": "^2.29.1", "moment": "^2.29.1",
"react": "^16.14.0", "react": "^17.0.2",
"react-cropper": "^2.1.7", "react-cropper": "^2.1.7",
"react-device-detect": "^1.14.0", "react-device-detect": "^1.14.0",
"react-dom": "^16.14.0", "react-dom": "^17.0.2",
"react-github-corner": "^2.5.0", "react-github-corner": "^2.5.0",
"react-i18next": "^11.8.7", "react-i18next": "^11.8.7",
"react-router-dom": "^5.2.0", "react-router-dom": "^5.2.0",
"react-scripts": "3.4.3" "react-scripts": "4.0.3"
}, },
"scripts": { "scripts": {
"start": "set PORT=7001 && react-scripts start", "start": "set PORT=7001 && craco start",
"build": "react-scripts build", "build": "craco build",
"test": "react-scripts test", "test": "craco test",
"eject": "react-scripts eject" "eject": "craco eject"
}, },
"eslintConfig": { "eslintConfig": {
"extends": "react-app" "extends": "react-app"

View File

@ -13,7 +13,7 @@
// limitations under the License. // limitations under the License.
import React, {Component} from 'react'; import React, {Component} from 'react';
import './App.css'; import './App.less';
import * as Setting from "./Setting"; import * as Setting from "./Setting";
import {DownOutlined, LogoutOutlined, SettingOutlined} from '@ant-design/icons'; import {DownOutlined, LogoutOutlined, SettingOutlined} from '@ant-design/icons';
import {Avatar, BackTop, Dropdown, Layout, Menu} from 'antd'; import {Avatar, BackTop, Dropdown, Layout, Menu} from 'antd';

View File

@ -1,4 +1,4 @@
@import '~antd/dist/antd.css'; @import '~antd/dist/antd.less';
.App { .App {
text-align: center; text-align: center;

File diff suppressed because it is too large Load Diff