Skip to content

Commit

Permalink
chore: button组件样式选择支持可视化选择类型
Browse files Browse the repository at this point in the history
  • Loading branch information
qkiroc committed Aug 17, 2023
1 parent 302e823 commit 030c2cb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/amis-editor-core/scss/components/_button.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.ButtonLevel-MenuTpl {
height: 40px;
display: flex;
align-items: center;
}
3 changes: 3 additions & 0 deletions packages/amis-editor-core/scss/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@
@import './style-control/style-common';
@import './style-control/theme-css-code';

/* 组件样式 */
@import './components/button';

@keyframes growing {
0% {
box-shadow: 0 0 10px rgba(#23b7e5, 0) inset;
Expand Down
2 changes: 2 additions & 0 deletions packages/amis-editor/src/tpl/common.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1083,6 +1083,8 @@ setSchemaTpl('buttonLevel', {
label: '按钮样式',
type: 'select',
name: 'level',
menuTpl:
'<div class="ButtonLevel-MenuTpl"><button type="button" class="cxd-Button cxd-Button--${value} cxd-Button--size-sm cxd-Button--block">${label}</button></div>',
options: [
{
label: '默认',
Expand Down

0 comments on commit 030c2cb

Please sign in to comment.