Sha256: 18deafc7803bc9c7d74af71e4603801e2c7c6da0d88337b6f27e575d13df3193

Contents?: true

Size: 351 Bytes

Versions: 9

Compression:

Stored size: 351 Bytes

Contents

import { create } from "zustand";

interface ModalState {
  component: JSX.Element | null;
  open: (elem: JSX.Element) => void;
  close: () => void;
}

const useModalStore = create<ModalState>((set) => ({
  component: null,
  open: (c: JSX.Element) => set({ component: c }),
  close: () => set({ component: null })
}));

export default useModalStore;

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
pages_core-3.15.4 app/javascript/stores/useModalStore.ts
pages_core-3.15.3 app/javascript/stores/useModalStore.ts
pages_core-3.15.2 app/javascript/stores/useModalStore.ts
pages_core-3.15.1 app/javascript/stores/useModalStore.ts
pages_core-3.14.0 app/javascript/stores/useModalStore.ts
pages_core-3.13.0 app/javascript/stores/useModalStore.ts
pages_core-3.12.7 app/javascript/stores/useModalStore.ts
pages_core-3.12.6 app/javascript/stores/useModalStore.ts
pages_core-3.12.5 app/javascript/stores/useModalStore.ts