mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-21 20:00:02 +00:00
refactor(editor): Move editor-ui and design-system to frontend dir (no-changelog) (#13564)
This commit is contained in:
32
packages/frontend/editor-ui/src/composables/useStyles.ts
Normal file
32
packages/frontend/editor-ui/src/composables/useStyles.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
const APP_Z_INDEXES = {
|
||||
APP_HEADER: 99,
|
||||
SELECT_BOX: 100,
|
||||
CANVAS_ADD_BUTTON: 101,
|
||||
NODE_CREATOR: 200,
|
||||
ASK_ASSISTANT_CHAT: 300,
|
||||
APP_SIDEBAR: 999,
|
||||
CANVAS_SELECT_BOX: 100,
|
||||
TOP_BANNERS: 999,
|
||||
NDV: 1800,
|
||||
MODALS: 2000,
|
||||
TOASTS: 2100,
|
||||
ASK_ASSISTANT_FLOATING_BUTTON: 3000,
|
||||
ASK_ASSISTANT_FLOATING_BUTTON_TOOLTIP: 3000,
|
||||
DRAGGABLE: 9999999,
|
||||
ACTIVE_STICKY: 9999999,
|
||||
WORKFLOW_PREVIEW_NDV: 9999999,
|
||||
NPS_SURVEY_MODAL: 3001,
|
||||
} as const;
|
||||
|
||||
const setAppZIndexes = () => {
|
||||
Object.keys(APP_Z_INDEXES).forEach((key) => {
|
||||
const variableName = `--z-index-${key.toLowerCase().replaceAll('_', '-')}`;
|
||||
const value = APP_Z_INDEXES[key as keyof typeof APP_Z_INDEXES];
|
||||
document.documentElement.style.setProperty(variableName, `${value}`);
|
||||
});
|
||||
};
|
||||
|
||||
export const useStyles = () => ({
|
||||
APP_Z_INDEXES,
|
||||
setAppZIndexes,
|
||||
});
|
||||
Reference in New Issue
Block a user