mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 15:06:02 +01:00
feat(web): developer drawer
Move all debug functions into a single developer drawer, Not the best implementation as there is focus fighting going on between some elements and the drawer but will do for now without state management
This commit is contained in:
38
web/src/features/dev/debug/context.ts
Normal file
38
web/src/features/dev/debug/context.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
import { ContextMenuProps } from "../../../interfaces/context";
|
||||
import { debugData } from "../../../utils/debugData";
|
||||
|
||||
export const debugContext = () => {
|
||||
debugData<ContextMenuProps>([
|
||||
{
|
||||
action: "showContext",
|
||||
data: {
|
||||
title: "Vehicle garage",
|
||||
options: [
|
||||
{ title: "Empty button" },
|
||||
{
|
||||
title: "Example button",
|
||||
description: "Example button description",
|
||||
icon: "inbox",
|
||||
image: "https://i.imgur.com/YAe7k17.jpeg",
|
||||
metadata: [{ label: "Value 1", value: 300 }],
|
||||
},
|
||||
{
|
||||
title: "Menu button",
|
||||
icon: "bars",
|
||||
menu: "other_example_menu",
|
||||
description: "Takes you to another menu",
|
||||
metadata: ["It also has metadata support"],
|
||||
},
|
||||
{
|
||||
title: "Event button",
|
||||
description: "Open a menu and send event data",
|
||||
icon: "check",
|
||||
arrow: true,
|
||||
event: "some_event",
|
||||
args: { value1: 300, value2: "Other value" },
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
]);
|
||||
};
|
||||
Reference in New Issue
Block a user