Skip to content

Commit

Permalink
fix: modal style (#621)
Browse files Browse the repository at this point in the history
  • Loading branch information
huaxiabuluo authored Aug 22, 2023
1 parent 98db360 commit 90f3eef
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 11 deletions.
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

0 comments on commit 90f3eef

Please sign in to comment.