Skip to content

armgit / jan

Public Imported from GitHub
0

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.

411 B
Raw Blame
import { createContext, useContext } from 'react'

// React context survives body portals; CSS custom properties on modal DOM do not.
// Keep the two classes literal so Tailwind includes both in the generated CSS.
export const ModalLayerContext = createContext(false)

export function useFloatingLayer() {
  return useContext(ModalLayerContext)
    ? 'z-(--layer-modal-floating)'
    : 'z-(--layer-floating)'
}