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

56 lines
1.6 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-11-06 11:01:39 +01:00
disabled: true,
},
{
title: 'Oil Level',
description: 'Vehicle oil level',
progress: 30,
icon: 'oil-can',
metadata: [{ label: 'Remaining Oil', value: '30%' }],
arrow: true,
},
{
title: 'Durability',
progress: 80,
icon: 'car-side',
metadata: [{ label: 'Durability', value: '80%' }],
colorScheme: 'blue'
},
{
2022-08-27 15:58:36 +02:00
title: 'Menu button',
icon: 'bars',
menu: 'other_example_menu',
arrow: false,
2022-08-27 15:58:36 +02:00
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' },
},
],
},
},
]);
};