Skip to content

Commit

Permalink
fix(ui): FooterToolbar children large size should work correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
dengfuping committed Jan 27, 2024
1 parent ea63501 commit 0bfbbe6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 deletions.
18 changes: 1 addition & 17 deletions packages/ui/src/FooterToolbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,14 @@ const FooterToolbar: React.FC<FooterToolbarProps> = ({
// render footer under parent instead of body by default
portalDom = false,
prefixCls: customizePrefixCls,
children,
...restProps
}) => {
const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);
const prefixCls = getPrefixCls('pro-footer-bar', customizePrefixCls);
const { wrapSSR } = useStyle(prefixCls);

const { token } = theme.useToken();

return wrapSSR(
<AntFooterToolbar portalDom={portalDom} prefixCls={customizePrefixCls} {...restProps}>
<ConfigProvider
// large size component
componentSize="large"
// middle font size
theme={{
token: {
fontSizeLG: token.fontSize,
},
}}
>
{children}
</ConfigProvider>
</AntFooterToolbar>
<AntFooterToolbar portalDom={portalDom} prefixCls={customizePrefixCls} {...restProps} />
);
};

Expand Down
4 changes: 1 addition & 3 deletions packages/ui/src/PageContainer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { PageContainer as AntPageContainer } from '@ant-design/pro-components';
import classNames from 'classnames';
import { isObject } from 'lodash';
import React, { useContext } from 'react';
import { ConfigProvider, Space, Tooltip, theme } from '@oceanbase/design';
import { ConfigProvider, Space, Tooltip } from '@oceanbase/design';
import LocaleWrapper from '../locale/LocaleWrapper';
import ItemRender from './ItemRender';
import zhCN from './locale/zh-CN';
Expand Down Expand Up @@ -46,8 +46,6 @@ const PageContainer = ({
const prefixCls = getPrefixCls('pro-page-container', customizePrefixCls);
const { wrapSSR } = useStyle(prefixCls);

const { token } = theme.useToken();

const { reload, subTitle, breadcrumb } = header || {};
const reloadProps =
isObject(reload) && !React.isValidElement(reload)
Expand Down

0 comments on commit 0bfbbe6

Please sign in to comment.