Home / File/ preset-actions.tsx — ui Source File

preset-actions.tsx — ui Source File

Architecture documentation for preset-actions.tsx, a tsx file in the ui codebase. 9 imports, 1 dependents.

File tsx ApplicationExhibition PlaygroundAI 9 imports 1 dependents 1 functions

Entity Profile

Dependency Diagram

graph LR
  60ce299c_13bd_f6c6_b9b9_09596553148a["preset-actions.tsx"]
  1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"]
  60ce299c_13bd_f6c6_b9b9_09596553148a --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2
  d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3["lucide-react"]
  60ce299c_13bd_f6c6_b9b9_09596553148a --> d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3
  e750d152_1191_1793_7244_99c7f9c595f4["sonner"]
  60ce299c_13bd_f6c6_b9b9_09596553148a --> e750d152_1191_1793_7244_99c7f9c595f4
  22caac49_069c_c355_0aca_120ba055a229["alert-dialog"]
  60ce299c_13bd_f6c6_b9b9_09596553148a --> 22caac49_069c_c355_0aca_120ba055a229
  57e86e45_ac6e_7278_be08_9092724e8401["button"]
  60ce299c_13bd_f6c6_b9b9_09596553148a --> 57e86e45_ac6e_7278_be08_9092724e8401
  0896a8fa_5462_a73a_5add_fb8176921778["dialog"]
  60ce299c_13bd_f6c6_b9b9_09596553148a --> 0896a8fa_5462_a73a_5add_fb8176921778
  d1cb37f2_0d1d_01bc_0d60_a15219afac51["dropdown-menu"]
  60ce299c_13bd_f6c6_b9b9_09596553148a --> d1cb37f2_0d1d_01bc_0d60_a15219afac51
  d752035b_6ed3_c6ef_e27c_eef51af9ec8d["label"]
  60ce299c_13bd_f6c6_b9b9_09596553148a --> d752035b_6ed3_c6ef_e27c_eef51af9ec8d
  38ebb3c2_9638_6c9d_8ced_a16ec1ff06c9["switch"]
  60ce299c_13bd_f6c6_b9b9_09596553148a --> 38ebb3c2_9638_6c9d_8ced_a16ec1ff06c9
  5ee45142_aa10_ca73_456e_5946db3e53c3["page.tsx"]
  5ee45142_aa10_ca73_456e_5946db3e53c3 --> 60ce299c_13bd_f6c6_b9b9_09596553148a
  style 60ce299c_13bd_f6c6_b9b9_09596553148a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import * as React from "react"
import { MoreHorizontal } from "lucide-react"
import { toast } from "sonner"

import {
  AlertDialog,
  AlertDialogCancel,
  AlertDialogContent,
  AlertDialogDescription,
  AlertDialogFooter,
  AlertDialogHeader,
  AlertDialogTitle,
} from "@/registry/new-york-v4/ui/alert-dialog"
import { Button } from "@/registry/new-york-v4/ui/button"
import {
  Dialog,
  DialogClose,
  DialogContent,
  DialogDescription,
  DialogFooter,
  DialogHeader,
  DialogTitle,
} from "@/registry/new-york-v4/ui/dialog"
import {
  DropdownMenu,
  DropdownMenuContent,
  DropdownMenuItem,
  DropdownMenuSeparator,
  DropdownMenuTrigger,
} from "@/registry/new-york-v4/ui/dropdown-menu"
import { Label } from "@/registry/new-york-v4/ui/label"
import { Switch } from "@/registry/new-york-v4/ui/switch"

export function PresetActions() {
  const [open, setIsOpen] = React.useState(false)
  const [showDeleteDialog, setShowDeleteDialog] = React.useState(false)

  return (
    <>
      <DropdownMenu>
        <DropdownMenuTrigger asChild>
          <Button variant="secondary" size="icon">
            <span className="sr-only">Actions</span>
            <MoreHorizontal />
          </Button>
        </DropdownMenuTrigger>
        <DropdownMenuContent align="end">
          <DropdownMenuItem onSelect={() => setIsOpen(true)}>
            Content filter preferences
          </DropdownMenuItem>
          <DropdownMenuSeparator />
          <DropdownMenuItem
            onSelect={() => setShowDeleteDialog(true)}
            className="text-red-600"
          >
            Delete preset
          </DropdownMenuItem>
        </DropdownMenuContent>
// ... (62 more lines)

Subdomains

Functions

Dependencies

  • alert-dialog
  • button
  • dialog
  • dropdown-menu
  • label
  • lucide-react
  • react
  • sonner
  • switch

Frequently Asked Questions

What does preset-actions.tsx do?
preset-actions.tsx is a source file in the ui codebase, written in tsx. It belongs to the ApplicationExhibition domain, PlaygroundAI subdomain.
What functions are defined in preset-actions.tsx?
preset-actions.tsx defines 1 function(s): PresetActions.
What does preset-actions.tsx depend on?
preset-actions.tsx imports 9 module(s): alert-dialog, button, dialog, dropdown-menu, label, lucide-react, react, sonner, and 1 more.
What files import preset-actions.tsx?
preset-actions.tsx is imported by 1 file(s): page.tsx.
Where is preset-actions.tsx in the architecture?
preset-actions.tsx is located at apps/v4/app/(app)/examples/playground/components/preset-actions.tsx (domain: ApplicationExhibition, subdomain: PlaygroundAI, directory: apps/v4/app/(app)/examples/playground/components).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free