Home / Function/ Calendars() — ui Function Reference

Calendars() — ui Function Reference

Architecture documentation for the Calendars() function in calendars.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  621959a0_fd19_416b_341d_444d18b2bb67["Calendars()"]
  49f3293e_dd2d_314b_a564_9879fbda5ddc["calendars.tsx"]
  621959a0_fd19_416b_341d_444d18b2bb67 -->|defined in| 49f3293e_dd2d_314b_a564_9879fbda5ddc
  style 621959a0_fd19_416b_341d_444d18b2bb67 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/registry/bases/base/blocks/sidebar-15/components/calendars.tsx lines 21–85

export function Calendars({
  calendars,
}: {
  calendars: {
    name: string
    items: string[]
  }[]
}) {
  return (
    <>
      {calendars.map((calendar, index) => (
        <React.Fragment key={calendar.name}>
          <SidebarGroup key={calendar.name}>
            <Collapsible
              defaultOpen={index === 0}
              className="group/collapsible"
            >
              <SidebarGroupLabel
                className="group/label text-sidebar-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground w-full text-sm"
                render={<CollapsibleTrigger />}
              >
                {calendar.name}{" "}
                <IconPlaceholder
                  lucide="ChevronRightIcon"
                  tabler="IconChevronRight"
                  hugeicons="ArrowRight01Icon"
                  phosphor="CaretRightIcon"
                  remixicon="RiArrowRightSLine"
                  className="ml-auto transition-transform group-data-open/collapsible:rotate-90"
                />
              </SidebarGroupLabel>
              <CollapsibleContent>
                <SidebarGroupContent>
                  <SidebarMenu>
                    {calendar.items.map((item, index) => (
                      <SidebarMenuItem key={item}>
                        <SidebarMenuButton>
                          <div
                            data-active={index < 2}
                            className="group/calendar-item border-sidebar-border text-sidebar-primary-foreground data-[active=true]:border-sidebar-primary data-[active=true]:bg-sidebar-primary flex aspect-square size-4 shrink-0 items-center justify-center rounded-xs border"
                          >
                            <IconPlaceholder
                              lucide="CheckIcon"
                              tabler="IconCheck"
                              hugeicons="Tick02Icon"
                              phosphor="CheckIcon"
                              remixicon="RiCheckLine"
                              className="hidden size-3 group-data-[active=true]/calendar-item:block"
                            />
                          </div>
                          {item}
                        </SidebarMenuButton>
                      </SidebarMenuItem>
                    ))}
                  </SidebarMenu>
                </SidebarGroupContent>
              </CollapsibleContent>
            </Collapsible>
          </SidebarGroup>
          <SidebarSeparator className="mx-0" />
        </React.Fragment>
      ))}
    </>
  )
}

Subdomains

Frequently Asked Questions

What does Calendars() do?
Calendars() is a function in the ui codebase, defined in apps/v4/registry/bases/base/blocks/sidebar-15/components/calendars.tsx.
Where is Calendars() defined?
Calendars() is defined in apps/v4/registry/bases/base/blocks/sidebar-15/components/calendars.tsx at line 21.

Analyze Your Own Codebase

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

Try Supermodel Free