shared/BaseDrawer.tsx

appwrite · apps/console/src/components/global/shared/BaseDrawer.tsx · typescript · BSD-3-Clause
ui

Reusable BaseDrawer component using Radix UI, with focus management and customizable header.

// Source: https://github.com/appwrite/appwrite | License: BSD-3-Clause | Copyright 2019 Appwrite (https://appwrite.io) and individual contributors
// Provided via justclaw.it.com; keep this notice with the code.
import * as React from 'react'
import { X } from 'lucide-react'
import { Button } from '@/components/ui/button'
import {
  Sheet,
  SheetContent,
  SheetHeader,
  SheetTitle,
  SheetDescription,
  SheetClose,
} from '@/components/ui/sheet'
import { cn } from '@/lib/utils'
import { handleModalOpenAutoFocus } from '@/lib/layout/modal-auto-focus'
import { useT } from '@/lib/i18n/translate'

export interface BaseDrawerProps {
  open: boolean
  onOpenChange: (open: boolean) => void
  title?: string
  description?: string
  children: React.ReactNode
  headerActions?: React.ReactNode
  /

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key