store/uiStore.ts

hook·mobile·0.4 KB · 20 lignes· Voir l'itinéraire
Annotation non disponible

Lance npm run annotate (nécessite ANTHROPIC_API_KEY dans .env.local) pour générer une annotation française par Claude Haiku 4.5.

1 export

useUIStore

Code source· typescript

import { create } from 'zustand';

type UIStore = {
  tabBarVisible: boolean;
  showTabBar: () => void;
  hideTabBar: () => void;

  topbarHeight: number;
  setTopbarHeight: (h: number) => void;
};

export const useUIStore = create<UIStore>((set) => ({
  tabBarVisible: true,
  showTabBar: () => set({ tabBarVisible: true }),
  hideTabBar: () => set({ tabBarVisible: false }),

  topbarHeight: 100,
  setTopbarHeight: (h) => set({ topbarHeight: h }),
}));