Skip to content

Commit

Permalink
feat(design): ConfigProvider add theme.isAliyun prop
Browse files Browse the repository at this point in the history
  • Loading branch information
dengfuping committed Jun 19, 2024
1 parent 7b220a0 commit f9ba68c
Show file tree
Hide file tree
Showing 12 changed files with 6,716 additions and 13,867 deletions.
22 changes: 19 additions & 3 deletions .dumi/theme/common/ThemeSwitch/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { FloatButton } from '@oceanbase/design';
import Icon, { CloudOutlined } from '@ant-design/icons';
import { CompactTheme, DarkTheme, Motion } from 'antd-token-previewer/es/icons';
import { FormattedMessage } from 'dumi';
import React from 'react';
import ThemeIcon from './ThemeIcon';
import { FontColorsOutlined } from '@ant-design/icons';

export type ThemeName = 'light' | 'dark' | 'compact' | 'motion-off' | 'custom-font';
export type ThemeName = 'light' | 'dark' | 'compact' | 'aliyun' | 'motion-off' | 'custom-font';

export type ThemeSwitchProps = {
value?: ThemeName[];
Expand All @@ -26,7 +27,7 @@ const ThemeSwitch: React.FC<ThemeSwitchProps> = (props: ThemeSwitchProps) => {
if (value.includes('dark')) {
onChange(value.filter(theme => theme !== 'dark'));
} else {
onChange([...value, 'dark']);
onChange([...value.filter(theme => !['light', 'aliyun'].includes(theme)), 'dark']);
}
}}
tooltip={<FormattedMessage id="app.theme.switch.dark" />}
Expand All @@ -38,11 +39,26 @@ const ThemeSwitch: React.FC<ThemeSwitchProps> = (props: ThemeSwitchProps) => {
if (value.includes('compact')) {
onChange(value.filter(theme => theme !== 'compact'));
} else {
onChange([...value, 'compact']);
onChange([...value.filter(theme => !['aliyun'].includes(theme)), 'compact']);
}
}}
tooltip={<FormattedMessage id="app.theme.switch.compact" />}
/>
<FloatButton
icon={<CloudOutlined />}
type={value.includes('aliyun') ? 'primary' : 'default'}
onClick={() => {
if (value.includes('aliyun')) {
onChange(value.filter(theme => theme !== 'aliyun'));
} else {
onChange([
...value.filter(theme => !['light', 'dark', 'compact'].includes(theme)),
'aliyun',
]);
}
}}
tooltip={<FormattedMessage id="app.theme.switch.aliyun" />}
/>
<FloatButton
icon={<Motion />}
type={!isMotionOff ? 'primary' : 'default'}
Expand Down
1 change: 1 addition & 0 deletions .dumi/theme/layouts/GlobalLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ const GlobalLayout: React.FC = () => {
theme={{
algorithm: getAlgorithm(theme),
isDark: theme.includes('dark'),
isAliyun: theme.includes('aliyun'),
customFont: theme.includes('custom-font'),
token: {
motion: !theme.includes('motion-off'),
Expand Down
1 change: 1 addition & 0 deletions .dumi/theme/locales/en-US.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"app.theme.switch.dark": "Dark theme",
"app.theme.switch.compact": "Compact theme",
"app.theme.switch.aliyun": "Aliyun theme",
"app.theme.switch.motion.on": "Motion On",
"app.theme.switch.motion.off": "Motion Off",
"app.theme.switch.font.default": "Default Font",
Expand Down
1 change: 1 addition & 0 deletions .dumi/theme/locales/zh-CN.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"app.theme.switch.dark": "暗黑主题",
"app.theme.switch.compact": "紧凑主题",
"app.theme.switch.aliyun": "阿里云主题",
"app.theme.switch.motion.on": "动画开启",
"app.theme.switch.motion.off": "动画关闭",
"app.theme.switch.font.default": "默认字体",
Expand Down
1 change: 1 addition & 0 deletions .dumi/theme/slots/Header/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const useStyle = () => {
return {
nav: css`
height: 100%;
line-height: 100%;
font-size: 14px;
font-family: Avenir, ${fontFamily}, sans-serif;
border: 0;
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"@emotion/css": "^11.11.2",
"@emotion/react": "^11.11.4",
"@emotion/server": "^11.11.0",
"@oceanbase/aliyun-theme": "^0.1.2",
"@qixian.cs/github-contributors-list": "^2.0.1",
"@rc-component/trigger": "^2.0.0",
"@stackblitz/sdk": "^1.9.0",
Expand Down
1 change: 1 addition & 0 deletions packages/design/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
},
"dependencies": {
"@ant-design/cssinjs": "^1.19.1",
"@oceanbase/aliyun-theme": "^0.1.2",
"@oceanbase/icons": "workspace:^",
"@oceanbase/util": "workspace:^",
"ahooks": "^2.10.14",
Expand Down
6 changes: 4 additions & 2 deletions packages/design/src/button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ export type ButtonProps = AntButtonProps;

const Button = React.forwardRef<HTMLButtonElement | HTMLAnchorElement, ButtonProps>(
({ prefixCls: customizePrefixCls, className, ...restProps }, ref) => {
const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);
const { theme, getPrefixCls } = useContext(ConfigProvider.ConfigContext);
const prefixCls = getPrefixCls('btn', customizePrefixCls);
const { wrapSSR } = useStyle(prefixCls);
const buttonCls = classNames(className);
const buttonCls = classNames(className, {
[`${prefixCls}-aliyun`]: theme.isAliyun,

Check failure on line 18 in packages/design/src/button/index.tsx

View workflow job for this annotation

GitHub Actions / test (16.x, ubuntu-latest)

src/drawer/__tests__/index.test.tsx > Drawer > render with default footer

TypeError: Cannot read properties of undefined (reading 'isAliyun') ❯ src/button/index.tsx:18:38 ❯ renderWithHooks ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:16305:18 ❯ updateForwardRef ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:19226:20 ❯ beginWork ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:21636:16 ❯ beginWork$1 ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:27426:14 ❯ performUnitOfWork ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26560:12 ❯ workLoopSync ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26466:5 ❯ renderRootSync ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26434:7 ❯ recoverFromConcurrentError ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:25850:20 ❯ performConcurrentWorkOnRoot ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:25750:22

Check failure on line 18 in packages/design/src/button/index.tsx

View workflow job for this annotation

GitHub Actions / test (16.x, ubuntu-latest)

src/drawer/__tests__/index.test.tsx > Drawer > render with onOk

TypeError: Cannot read properties of undefined (reading 'isAliyun') ❯ src/button/index.tsx:18:38 ❯ renderWithHooks ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:16305:18 ❯ updateForwardRef ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:19226:20 ❯ beginWork ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:21636:16 ❯ beginWork$1 ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:27426:14 ❯ performUnitOfWork ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26560:12 ❯ workLoopSync ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26466:5 ❯ renderRootSync ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26434:7 ❯ recoverFromConcurrentError ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:25850:20 ❯ performConcurrentWorkOnRoot ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:25750:22

Check failure on line 18 in packages/design/src/button/index.tsx

View workflow job for this annotation

GitHub Actions / test (16.x, ubuntu-latest)

src/drawer/__tests__/index.test.tsx > Drawer > render with okText and cancenText

TypeError: Cannot read properties of undefined (reading 'isAliyun') ❯ src/button/index.tsx:18:38 ❯ renderWithHooks ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:16305:18 ❯ updateForwardRef ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:19226:20 ❯ beginWork ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:21636:16 ❯ beginWork$1 ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:27426:14 ❯ performUnitOfWork ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26560:12 ❯ workLoopSync ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26466:5 ❯ renderRootSync ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26434:7 ❯ recoverFromConcurrentError ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:25850:20 ❯ performConcurrentWorkOnRoot ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:25750:22

Check failure on line 18 in packages/design/src/button/index.tsx

View workflow job for this annotation

GitHub Actions / test (16.x, ubuntu-latest)

src/drawer/__tests__/index.test.tsx > Drawer > render with confirmLoading and okButtonProps

TypeError: Cannot read properties of undefined (reading 'isAliyun') ❯ src/button/index.tsx:18:38 ❯ renderWithHooks ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:16305:18 ❯ updateForwardRef ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:19226:20 ❯ beginWork ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:21636:16 ❯ beginWork$1 ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:27426:14 ❯ performUnitOfWork ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26560:12 ❯ workLoopSync ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26466:5 ❯ renderRootSync ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26434:7 ❯ recoverFromConcurrentError ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:25850:20 ❯ performConcurrentWorkOnRoot ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:25750:22

Check failure on line 18 in packages/design/src/button/index.tsx

View workflow job for this annotation

GitHub Actions / test (16.x, ubuntu-latest)

src/drawer/__tests__/index.test.tsx > Drawer > render with footerExtra and default footer

TypeError: Cannot read properties of undefined (reading 'isAliyun') ❯ src/button/index.tsx:18:38 ❯ renderWithHooks ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:16305:18 ❯ updateForwardRef ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:19226:20 ❯ beginWork ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:21636:16 ❯ beginWork$1 ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:27426:14 ❯ performUnitOfWork ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26560:12 ❯ workLoopSync ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26466:5 ❯ renderRootSync ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26434:7 ❯ recoverFromConcurrentError ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:25850:20 ❯ performConcurrentWorkOnRoot ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:25750:22

Check failure on line 18 in packages/design/src/button/index.tsx

View workflow job for this annotation

GitHub Actions / test (16.x, ubuntu-latest)

node_modules/@oceanbase/design/src/drawer/__tests__/index.test.tsx > Drawer > render with default footer

TypeError: Cannot read properties of undefined (reading 'isAliyun') ❯ ../design/src/button/index.tsx:18:38 ❯ renderWithHooks ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:16305:18 ❯ updateForwardRef ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:19226:20 ❯ beginWork ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:21636:16 ❯ beginWork$1 ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:27426:14 ❯ performUnitOfWork ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26560:12 ❯ workLoopSync ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26466:5 ❯ renderRootSync ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26434:7 ❯ recoverFromConcurrentError ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:25850:20 ❯ performConcurrentWorkOnRoot ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:25750:22

Check failure on line 18 in packages/design/src/button/index.tsx

View workflow job for this annotation

GitHub Actions / test (16.x, ubuntu-latest)

node_modules/@oceanbase/design/src/drawer/__tests__/index.test.tsx > Drawer > render with onOk

TypeError: Cannot read properties of undefined (reading 'isAliyun') ❯ ../design/src/button/index.tsx:18:38 ❯ renderWithHooks ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:16305:18 ❯ updateForwardRef ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:19226:20 ❯ beginWork ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:21636:16 ❯ beginWork$1 ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:27426:14 ❯ performUnitOfWork ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26560:12 ❯ workLoopSync ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26466:5 ❯ renderRootSync ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26434:7 ❯ recoverFromConcurrentError ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:25850:20 ❯ performConcurrentWorkOnRoot ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:25750:22

Check failure on line 18 in packages/design/src/button/index.tsx

View workflow job for this annotation

GitHub Actions / test (16.x, ubuntu-latest)

node_modules/@oceanbase/design/src/drawer/__tests__/index.test.tsx > Drawer > render with okText and cancenText

TypeError: Cannot read properties of undefined (reading 'isAliyun') ❯ ../design/src/button/index.tsx:18:38 ❯ renderWithHooks ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:16305:18 ❯ updateForwardRef ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:19226:20 ❯ beginWork ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:21636:16 ❯ beginWork$1 ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:27426:14 ❯ performUnitOfWork ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26560:12 ❯ workLoopSync ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26466:5 ❯ renderRootSync ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26434:7 ❯ recoverFromConcurrentError ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:25850:20 ❯ performConcurrentWorkOnRoot ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:25750:22
});
return wrapSSR(
<AntButton ref={ref} prefixCls={customizePrefixCls} className={buttonCls} {...restProps} />
);
Expand Down
2 changes: 1 addition & 1 deletion packages/design/src/button/style/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const genButtonStyle: GenerateStyle<ButtonToken> = (token: ButtonToken) =
// remove box-shadow for button
boxShadow: 'none !important',
},
[`${componentCls}${componentCls}-primary:not([disabled]):not(${componentCls}-disabled):not(${componentCls}-dangerous):not(${componentCls}-background-ghost)`]:
[`${componentCls}${componentCls}-primary:not([disabled]):not(${componentCls}-disabled):not(${componentCls}-dangerous):not(${componentCls}-background-ghost):not(${componentCls}-aliyun)`]:
{
background: 'linear-gradient(-59deg, #002BFF 0%, #0080FF 100%)',
border: 'none',
Expand Down
2 changes: 2 additions & 0 deletions packages/design/src/config-provider/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ nav:
- 🔥 完全继承 antd [ConfigProvider](https://ant.design/components/config-provider-cn) 的能力和 API,可无缝切换。
- 🌈 定制全局主题和空状态,以符合 OceanBase Design 设计规范。
- 🆕 默认内嵌 [App 包裹组件](https://ant.design/components/app-cn),支持 message, notification 和 Modal 等静态方法消费 ConfigProvider 配置。
- 🆕 新增 `theme.isAliyun` 属性,用于开启阿里云主题。
- 🆕 新增 `theme.customFont` 属性,用于开启 `Source Sans Pro` 定制字体以提升展示效果,仅支持线上应用和英文环境。
- 🆕 新增 `locale.Input.placeholder` 属性,用于配置 Input 的默认 `placeholder`
- 🆕 新增 `table.selectionColumnWidth` 属性,用于配置表格的展开列宽度。
Expand Down Expand Up @@ -49,6 +50,7 @@ export default App;

| 参数 | 说明 | 类型 | 默认值 | 版本 |
| :-- | :-- | :-- | :-- | :-- |
| theme.isAliyun | 用于开启阿里云主题 | boolean | - | 0.3.5 |
| theme.customFont | 用于开启 `Source Sans Pro` 定制字体以提升展示效果,仅支持线上应用和英文环境 | boolean | - | 0.3.1 |
| locale.Input.placeholder | 用于配置 Input 的默认 `placeholder` | string | - | 0.3.2 |
| spin | Spin 全局配置 | `{ indicator?: ReactNode; className?: string; style?: React.CSSProperties; }` | - | - |
Expand Down
19 changes: 12 additions & 7 deletions packages/design/src/config-provider/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import StaticFunction, { injectedStaticFunction } from '../static-function';
import themeConfig from '../theme';
import defaultTheme from '../theme/default';
import darkTheme from '../theme/dark';
import aliyunTheme from '@oceanbase/aliyun-theme';
import DefaultRenderEmpty from './DefaultRenderEmpty';
import type { NavigateFunction } from './navigate';
import type { Locale } from '../locale';
Expand All @@ -29,6 +30,7 @@ export * from 'antd/es/config-provider';

export interface ThemeConfig extends AntThemeConfig {
isDark?: boolean;
isAliyun?: boolean;
/* use custom font or not */
customFont?: boolean;
}
Expand Down Expand Up @@ -105,36 +107,39 @@ const ConfigProvider: ConfigProviderType = ({
const parentContext = React.useContext<ConfigConsumerProps>(AntConfigProvider.ConfigContext);
const parentExtendedContext =
React.useContext<ExtendedConfigConsumerProps>(ExtendedConfigContext);
const mergedTheme = merge(parentContext.theme, theme);
const currentTheme = mergedTheme?.isDark ? darkTheme : defaultTheme;
const { isDark, isAliyun } = merge({}, parentContext.theme, theme);
const currentTheme = isAliyun ? aliyunTheme : isDark ? darkTheme : defaultTheme;
const mergedTheme = merge({}, parentContext.theme, currentTheme, theme);

const { token } = themeConfig.useToken();
const fontFamily = mergedTheme.token?.fontFamily || token.fontFamily;
const customFont = mergedTheme.customFont;

// inherit from parent StyleProvider
const parentStyleContext = React.useContext<StyleContextProps>(StyleContext);
const mergedStyleProviderProps = merge(parentStyleContext, styleProviderProps);
const mergedStyleProviderProps = merge({}, parentStyleContext, styleProviderProps);

return (
<AntConfigProvider
locale={merge(parentContext.locale, locale)}
locale={merge({}, parentContext.locale, locale)}
form={merge(
{},
{
requiredMark: 'optional',
},
parentContext.form,
form
)}
spin={merge(parentContext.spin, spin)}
table={merge(parentContext.table, table)}
spin={merge({}, parentContext.spin, spin)}
table={merge({}, parentContext.table, table)}
tabs={merge(
{
indicatorSize: origin => (origin >= 24 ? origin - 16 : origin),
},
parentContext.tabs,
tabs
)}
theme={merge(currentTheme, mergedTheme, {
theme={merge({}, mergedTheme, {
token: {
fontFamily:
customFont && !fontFamily.startsWith(`'Source Sans Pro'`)
Expand Down
Loading

0 comments on commit f9ba68c

Please sign in to comment.