Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade antd #811

Merged
merged 14 commits into from
Dec 14, 2020
6 changes: 6 additions & 0 deletions ui/lib/apps/ClusterInfo/pages/List.module.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.sticky_tabs_header {
padding-left: 48px;
baurine marked this conversation as resolved.
Show resolved Hide resolved
height: 46px;
margin-bottom: 16px;
baurine marked this conversation as resolved.
Show resolved Hide resolved
border-bottom: 1px solid #f0f0f0;
baurine marked this conversation as resolved.
Show resolved Hide resolved
}
4 changes: 3 additions & 1 deletion ui/lib/apps/ClusterInfo/pages/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ import HostTable from '../components/HostTable'
import InstanceTable from '../components/InstanceTable'
import StoreLocation from '../components/StoreLocation'

import styles from './List.module.less'

function renderTabBar(props, DefaultTabBar) {
return (
<Sticky stickyPosition={StickyPositionType.Header}>
<DefaultTabBar {...props} />
<DefaultTabBar {...props} className={styles.sticky_tabs_header} />
</Sticky>
)
}
Expand Down
2 changes: 1 addition & 1 deletion ui/lib/components/CardTabs/index.module.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
margin-right: -@padding-page;

:global {
.ant-tabs-bar {
.ant-tabs-nav {
Copy link
Member

@breezewish breezewish Nov 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe better to find some way to remove this rule (which depends on the internal implementation of Antd's Tab).

I'm not sure renderTabBar could be useful.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, let me try it.

Copy link
Collaborator Author

@baurine baurine Nov 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works, awesome!

padding-left: @padding-page;
padding-right: @padding-page;
}
Expand Down
4 changes: 2 additions & 2 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
"@umijs/hooks": "^1.9.3",
"@welldone-software/why-did-you-render": "^4.2.7",
"ace-builds": "^1.4.12",
"antd": "~4.2",
"antd": "~4.8.5",
"axios": "^0.19.0",
"bulma": "^0.9.0",
"classnames": "^2.2.6",
"d3": "^5.16.0",
"dayjs": "^1.8.31",
"dayjs": "^1.9.6",
"echarts": "^4.8.0",
"echarts-for-react": "^2.0.16",
"i18next": "^19.6.3",
Expand Down
Loading