Home / Function/ PresetShare() — ui Function Reference

PresetShare() — ui Function Reference

Architecture documentation for the PresetShare() function in preset-share.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  b15d8002_f6cc_40ae_c94a_f5d3e18ba43c["PresetShare()"]
  e32afc17_4346_5b21_fc24_3390704c009e["preset-share.tsx"]
  b15d8002_f6cc_40ae_c94a_f5d3e18ba43c -->|defined in| e32afc17_4346_5b21_fc24_3390704c009e
  style b15d8002_f6cc_40ae_c94a_f5d3e18ba43c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/app/(app)/examples/playground/components/preset-share.tsx lines 12–49

export function PresetShare() {
  return (
    <Popover>
      <PopoverTrigger asChild>
        <Button variant="secondary">Share</Button>
      </PopoverTrigger>
      <PopoverContent align="end" className="flex w-[520px] flex-col gap-4">
        <div className="flex flex-col gap-1 text-center sm:text-left">
          <h3 className="text-lg font-semibold">Share preset</h3>
          <p className="text-muted-foreground text-sm">
            Anyone who has this link and an OpenAI account will be able to view
            this.
          </p>
        </div>
        <div className="relative flex-1">
          <Label htmlFor="link" className="sr-only">
            Link
          </Label>
          <Input
            id="link"
            defaultValue="https://platform.openai.com/playground/p/7bbKYQvsVkNmVb8NGcdUOLae?model=text-davinci-003"
            readOnly
            className="h-9 pr-10"
          />
          <Button
            type="submit"
            size="icon"
            variant="ghost"
            className="absolute top-1 right-1 size-7"
          >
            <span className="sr-only">Copy</span>
            <Copy className="size-3.5" />
          </Button>
        </div>
      </PopoverContent>
    </Popover>
  )
}

Subdomains

Frequently Asked Questions

What does PresetShare() do?
PresetShare() is a function in the ui codebase, defined in apps/v4/app/(app)/examples/playground/components/preset-share.tsx.
Where is PresetShare() defined?
PresetShare() is defined in apps/v4/app/(app)/examples/playground/components/preset-share.tsx at line 12.

Analyze Your Own Codebase

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

Try Supermodel Free