mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-22 22:35:45 +00:00
fix(FE): refactor UI Dashboard pixel perfect figma
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
'use client';
|
||||
|
||||
import { ReactNode } from 'react';
|
||||
import { StateCreator } from 'zustand';
|
||||
import { UIStore } from '@/types/stores';
|
||||
|
||||
type NavbarActionsSlice = {
|
||||
navbarActions: ReactNode | null;
|
||||
setNavbarActions: (actions: ReactNode) => void;
|
||||
clearNavbarActions: () => void;
|
||||
};
|
||||
|
||||
export const createNavbarActionsSlice: StateCreator<
|
||||
UIStore,
|
||||
[],
|
||||
[],
|
||||
NavbarActionsSlice
|
||||
> = (set) => ({
|
||||
navbarActions: null,
|
||||
setNavbarActions: (actions) => set({ navbarActions: actions }),
|
||||
clearNavbarActions: () => set({ navbarActions: null }),
|
||||
});
|
||||
@@ -7,6 +7,7 @@ import { UIStore } from '@/types/stores';
|
||||
import { createMainUiSlice } from '@/stores/ui/slices/main.slice';
|
||||
import { createDrawerUISlice } from '@/stores/ui/slices/drawer.slice';
|
||||
import { createTableUISlice } from '@/stores/ui/slices/table.slice';
|
||||
import { createNavbarActionsSlice } from '@/stores/ui/slices/navbar.slice';
|
||||
|
||||
export const useUiStore = create<UIStore>()(
|
||||
devtools(
|
||||
@@ -15,6 +16,7 @@ export const useUiStore = create<UIStore>()(
|
||||
...createMainUiSlice(...args),
|
||||
...createDrawerUISlice(...args),
|
||||
...createTableUISlice(...args),
|
||||
...createNavbarActionsSlice(...args),
|
||||
}),
|
||||
{
|
||||
name: 'ui-cache',
|
||||
|
||||
Reference in New Issue
Block a user