diff --git a/public/send.svg b/public/send.svg new file mode 100644 index 0000000..90a8d29 --- /dev/null +++ b/public/send.svg @@ -0,0 +1,13 @@ + + + + + + + + \ No newline at end of file diff --git a/src/chat.js b/src/chat.js index a4e0bb4..abfbf09 100644 --- a/src/chat.js +++ b/src/chat.js @@ -41,6 +41,7 @@ export default class Chat { boxShadow: '0 0 1rem #eee', border: 'none', outline: 'none', + borderRadius: '2rem' }, onkeydown: event => { event.stopPropagation() @@ -79,7 +80,6 @@ export default class Chat { } }), Button({ - textContent: '发送(Enter)', onclick: event => { const text = event.target.previousSibling.value.trim() if (text) { @@ -88,10 +88,11 @@ export default class Chat { } }, style: { - padding: '.5rem 1rem', - boxSizing: 'border-box', - boxShadow: '0 0 1rem #eee', - borderRadius: '1rem', + width: '1.2rem', + height: '1.2rem', + border: 'none', + background: 'url("/send.svg") no-repeat center / cover', + margin: 'auto 0 auto -2.6rem' } }), ] @@ -311,7 +312,7 @@ export default class Chat { maxWidth: '24rem', borderRadius: '1rem', listStyle: 'none', - backgroundColor : 'rgba(255,255,255,.9)', + backgroundColor: 'rgba(255,255,255,.9)', }, children: [ createElement({