chore(antd): reduce animation duration (#2602)

This commit is contained in:
被雨水过滤的空气-Rain 2023-09-07 08:46:58 +08:00 committed by GitHub
parent 3461c29411
commit 7d1bac1869
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -16,6 +16,7 @@ const defaultTheme: ThemeConfig = {
colorSettings: '#F18B62',
colorBgSettingsHover: 'rgba(241, 139, 98, 0.06)',
colorBorderSettingsHover: 'rgba(241, 139, 98, 0.3)',
motionUnit: 0.03,
},
};

View File

@ -2,10 +2,12 @@ import {
Plugin,
SettingsCenterProvider,
createStyles,
defaultTheme,
useCurrentUserSettingsMenu,
useGlobalTheme,
} from '@nocobase/client';
import { ConfigProvider } from 'antd';
import _ from 'lodash';
import React, { useEffect, useMemo } from 'react';
import InitializeTheme from './components/InitializeTheme';
import { ThemeEditorProvider } from './components/ThemeEditorProvider';
@ -78,6 +80,10 @@ const CustomThemeProvider = React.memo((props) => {
</div>
);
if (!theme?.token?.motionUnit) {
_.set(theme, 'token.motionUnit', defaultTheme.token.motionUnit);
}
return (
<ConfigProvider theme={theme}>
<ThemeListProvider>