Skip to content

Commit 2727e08

Browse files
authored
Merge pull request #1582 from easyops-cn/steve/elevo-icons
Steve/elevo-icons
2 parents 8b9e451 + 8017b55 commit 2727e08

File tree

7 files changed

+98
-28
lines changed

7 files changed

+98
-28
lines changed

bricks/containers/src/modal/index.tsx

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ export interface ModalProps {
3232
modalTitle?: string;
3333
width?: string | number;
3434
height?: string | number;
35+
minWidth?: string | number;
36+
minHeight?: string | number;
3537
maskClosable?: boolean;
3638
confirmText?: string;
3739
cancelText?: string;
@@ -100,6 +102,24 @@ class Modal extends ReactNextElement implements ModalProps {
100102
*/
101103
@property({ attribute: false }) accessor height: string | number | undefined;
102104

105+
/**
106+
* 最小宽度
107+
*
108+
* @default "520px"
109+
*/
110+
@property({ attribute: false }) accessor minWidth:
111+
| string
112+
| number
113+
| undefined;
114+
115+
/**
116+
* 最小高度
117+
*/
118+
@property({ attribute: false }) accessor minHeight:
119+
| string
120+
| number
121+
| undefined;
122+
103123
/**
104124
* 点击遮罩层是否关闭模态框
105125
*/
@@ -285,6 +305,8 @@ class Modal extends ReactNextElement implements ModalProps {
285305
modalTitle={this.modalTitle}
286306
width={this.width}
287307
height={this.height}
308+
minWidth={this.minWidth}
309+
minHeight={this.minHeight}
288310
maskClosable={this.maskClosable}
289311
visible={this.visible}
290312
confirmText={this.confirmText}
@@ -323,6 +345,8 @@ function ModalComponent({
323345
modalTitle,
324346
width,
325347
height,
348+
minWidth,
349+
minHeight,
326350
maskClosable,
327351
confirmText = t(K.CONFIRM),
328352
cancelText = t(K.CANCEL),
@@ -571,10 +595,12 @@ function ModalComponent({
571595
className={classNames("modal", {
572596
fullscreen,
573597
"has-sidebar": hasSidebarContent,
574-
"has-height": !!height || fullscreen,
598+
"has-height": !!height || !!minHeight || fullscreen,
575599
})}
576600
style={
577-
fullscreen ? { width: "100%", height: "100%" } : { width, height }
601+
fullscreen
602+
? { width: "100%", height: "100%" }
603+
: { width, height, minWidth, minHeight }
578604
}
579605
>
580606
<div

shared/icons/src/icons/agent.svg

Lines changed: 15 additions & 10 deletions
Loading

shared/icons/src/icons/ai-employee.svg

Lines changed: 13 additions & 6 deletions
Loading
Lines changed: 10 additions & 0 deletions
Loading

shared/icons/src/icons/help.svg

Lines changed: 11 additions & 0 deletions
Loading

shared/icons/src/icons/logout.svg

Lines changed: 7 additions & 10 deletions
Loading

shared/icons/src/icons/team.svg

Lines changed: 14 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)