返回 CodeWhale
1 window.__ModuleLoader__.load({
2 id: '@local/my-decoration',
3 factory(require) {
4 const React = require('react');
5 const h = React.createElement;
6 function Decoration() {
7 return h('svg', {
8 viewBox: '0 0 64 64', width: 48, height: 48,
9 'aria-hidden': true,
10 style: { display: 'block', pointerEvents: 'none' },
11 }, h('circle', { cx: 32, cy: 32, r: 24, fill: '#247bbf' }));
12 }
13 return {
14 inject: ['slots'],
15 apply(ctx) {
16 ctx.slots.inject('conversation.composer.dock', () => ctx.slots.register({
17 name: 'conversation.composer.dock', id: 'my-decoration', order: 5,
18 }, Decoration));
19 },
20 };
21 },
22 });
23
23 lines JAVASCRIPT