Skip to content

Commit 9f1e2cc

Browse files
committed
style: modify toolbar style.
1 parent a6b5599 commit 9f1e2cc

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

src/components/ToolBar/index.less

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,19 @@
22

33
.@{editor-prefix} {
44
&-toolbar {
5-
border-bottom: 1px solid var(--color-border-muted);
5+
&-warp {
6+
display: flex;
7+
justify-content: space-between;
8+
align-items: center;
9+
user-select: none;
10+
flex-wrap: wrap;
11+
border-bottom: 1px solid var(--color-border-muted);
12+
}
613
background-color: var(--color-canvas-subtle);
714
padding: 4px 2px 4px 5px;
815
border-radius: 3px 3px 0 0;
916
display: flex;
17+
flex-wrap: wrap;
1018
gap: 2px;
1119
align-items: center;
1220
button {
@@ -38,7 +46,7 @@
3846
}
3947
}
4048
&-mode {
41-
float: right;
49+
// float: right;
4250
padding-right: 5px;
4351
}
4452
}

src/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ function MarkdownEditorInternal(
120120
return (
121121
<div className={cls} ref={container}>
122122
{hideToolbar && (
123-
<div>
124-
<ToolBar {...toolBarProps} toolbars={toolbarsMode} mode />
123+
<div className={`${prefixCls}-toolbar-warp`}>
125124
<ToolBar {...toolBarProps} toolbars={toolbars} />
125+
<ToolBar {...toolBarProps} toolbars={toolbarsMode} mode />
126126
</div>
127127
)}
128128
<div className={`${prefixCls}-content`} style={{ height: codemirrorProps.height }}>

0 commit comments

Comments
 (0)