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

fix: modal style #621

Merged
merged 1 commit into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions app/app.less
Original file line number Diff line number Diff line change
Expand Up @@ -204,3 +204,24 @@
.ant-table .ant-table-row {
background: #fff;
}

// for thoes who use command pattern to create a Modal and other components
// just `ConfigProvider` is not enough
.ant-modal .ant-modal-content {
padding: 0;
.ant-modal-header {
padding: 16px 24px;
border-bottom: 1px solid #f0f0f0;
margin-bottom: 0;
}
.ant-modal-body {
padding: 24px;
.ant-modal-confirm-body-wrapper {
padding: 24px 0;
}
}
.ant-modal-footer {
padding: 10px 16px;
border-top: 1px solid #f0f0f0;
}
}
2 changes: 1 addition & 1 deletion app/components/ErrorBoundary/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Button, message } from 'antd';
import { withRouter, RouteComponentProps } from 'react-router-dom';
import styles from './index.module.less';

type IProps = RouteComponentProps;
type IProps = RouteComponentProps & { children: React.ReactNode };
interface IState {
errInfo: string;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

.dataSourceModal {
:global {
.ant-modal-header {
border-bottom: none;
}
.ant-modal-body {
padding: 0 10px 35px;
.ant-modal-content {
.ant-modal-header {
border-bottom: none;
}
.ant-modal-body {
padding: 0 10px 35px;
}
}
}
.btns {
Expand Down
4 changes: 2 additions & 2 deletions app/pages/Import/TaskList/TaskItem/LogModal/index.module.less
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
white-space: nowrap;
}
:global {
.ant-modal-header {
.ant-modal-content .ant-modal-header {
border-bottom: none;
padding-right: 80px;
padding-top: 15px;
Expand All @@ -32,7 +32,7 @@
top: 5px;
}
}
.ant-modal-body {
.ant-modal-content .ant-modal-body {
display: flex;
height: 91%;
}
Expand Down
2 changes: 1 addition & 1 deletion app/pages/Import/TaskList/TemplateModal/index.module.less
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
.draggerTemplate {
margin-top: 30px;
background: #FFFFFF;
border: 1px dashed #000000;
// border: 1px dashed #000000;
:global(.ant-upload-btn) {
padding: 27px 30px;
& > :global(.ant-upload-drag-container) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@

.modalFieldAdd {
:global {
.ant-modal-header {
.ant-modal-content .ant-modal-header {
border-bottom: none;
}
.ant-modal-body {
.ant-modal-content .ant-modal-body {
text-align: center;
}
}
Expand Down