2023-09-09 11:34:46 +00:00
|
|
|
import { html } from '@design.estate/dees-element';
|
2024-01-15 18:42:15 +00:00
|
|
|
import * as plugins from './00plugins.js';
|
2023-09-09 11:34:46 +00:00
|
|
|
|
|
|
|
import { DeesContextmenu } from './dees-contextmenu.js';
|
|
|
|
|
|
|
|
export const demoFunc = () => html`
|
|
|
|
<style>
|
|
|
|
.withMargin {
|
|
|
|
display: block;
|
|
|
|
margin: 20px;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
<dees-button @contextmenu=${(eventArg) => {
|
|
|
|
DeesContextmenu.openContextMenuWithOptions(eventArg, [
|
|
|
|
{
|
|
|
|
name: 'copy',
|
|
|
|
iconName: 'copySolid',
|
|
|
|
action: async () => {
|
|
|
|
return null;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'edit',
|
|
|
|
iconName: 'penToSquare',
|
|
|
|
action: async () => {
|
|
|
|
return null;
|
|
|
|
},
|
|
|
|
},{
|
|
|
|
name: 'paste',
|
|
|
|
iconName: 'pasteSolid',
|
|
|
|
action: async () => {
|
|
|
|
return null;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
]);
|
2023-09-12 23:37:02 +00:00
|
|
|
}}>Right-Click for contextmenu</dees-button>
|
2023-09-09 11:34:46 +00:00
|
|
|
<dees-contextmenu class="withMargin"></dees-contextmenu>
|
|
|
|
<dees-contextmenu
|
|
|
|
class="withMargin"
|
|
|
|
.menuItems=${[
|
|
|
|
{
|
|
|
|
name: 'copy',
|
|
|
|
iconName: 'copySolid',
|
|
|
|
action: async () => {},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'edit',
|
|
|
|
iconName: 'penToSquare',
|
|
|
|
action: async () => {},
|
|
|
|
},{
|
|
|
|
name: 'paste',
|
|
|
|
iconName: 'pasteSolid',
|
|
|
|
action: async () => {},
|
|
|
|
},
|
|
|
|
] as plugins.tsclass.website.IMenuItem[]}
|
|
|
|
></dees-contextmenu>
|
|
|
|
`;
|