Files
ox_lib/web/src/features/dev/debug/context.ts

39 lines
1.1 KiB
TypeScript
Raw Normal View History

2022-08-27 15:58:36 +02:00
import { ContextMenuProps } from '../../../interfaces/context';
import { debugData } from '../../../utils/debugData';
export const debugContext = () => {
debugData<ContextMenuProps>([
{
2022-08-27 15:58:36 +02:00
action: 'showContext',
data: {
2022-08-27 15:58:36 +02:00
title: 'Vehicle garage',
options: [
2022-08-27 15:58:36 +02:00
{ title: 'Empty button' },
{
2022-08-27 15:58:36 +02:00
title: 'Example button',
description: 'Example button description',
icon: 'inbox',
image: 'https://i.imgur.com/YAe7k17.jpeg',
metadata: [{ label: 'Value 1', value: 300 }],
},
{
2022-08-27 15:58:36 +02:00
title: 'Menu button',
icon: 'bars',
menu: 'other_example_menu',
description: 'Takes you to another menu',
metadata: ['It also has metadata support'],
},
{
2022-08-27 15:58:36 +02:00
title: 'Event button',
description: 'Open a menu and send event data',
icon: 'check',
arrow: true,
2022-08-27 15:58:36 +02:00
event: 'some_event',
args: { value1: 300, value2: 'Other value' },
},
],
},
},
]);
};