Skip to content

Commit

Permalink
fix(comp: message): align icon with text
Browse files Browse the repository at this point in the history
  • Loading branch information
danranVm committed Apr 26, 2022
1 parent ac63edf commit adda15d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
6 changes: 2 additions & 4 deletions packages/components/message/demo/Content.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@
<script lang="ts">
import { defineComponent, h } from 'vue'
import { IxIcon } from '@idux/components/icon'
import { useMessage } from '@idux/components/message'
export default defineComponent({
setup() {
const message = useMessage()
const content = h('ul', {}, [
h('li', {}, 'This is a VNode content data'),
h('li', {}, 'This is a VNode content data'),
])
const content = h('span', {}, [h('span', {}, 'This is a VNode content '), h(IxIcon, { name: 'star' })])
const open = () => message.info(content)
Expand Down
11 changes: 5 additions & 6 deletions packages/components/message/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
line-height: @message-line-height;

&-content {
display: inline-flex;
display: inline-block;
min-width: @message-content-min-width;
max-width: @message-content-max-width;
padding: @message-content-padding-vertical @message-content-padding-horizontal;
Expand All @@ -20,12 +20,11 @@
box-shadow: @message-content-box-shadow;
pointer-events: all;

&-text {
display: inline-block;
text-align: left;
}

&-icon {
display: inline-block;
position: relative;
top: 1px;
line-height: 0;
margin-right: @message-icon-margin-right;
font-size: @font-size-lg;
}
Expand Down

0 comments on commit adda15d

Please sign in to comment.