"use client"; import { RenderComponentWithSnippet } from "@/app/components/render"; import { useState } from "react"; import { Input, Switch } from "@calcom/ui/components/form"; import { Section } from "@calcom/ui/components/section"; export const SubSectionExample = () => { const [isMainOpen, setIsMainOpen] = useState(true); const [isFirstSubsectionOpen, setIsFirstSubsectionOpen] = useState(true); const [isSecondSubsectionOpen, setIsSecondSubsectionOpen] = useState(true); return (
{isMainOpen && ( {isFirstSubsectionOpen && (

This is the content of the first subsection.

)}
{isSecondSubsectionOpen && (
Field Name
Field Type
Value
When to Write
)}
)}
); }; export const SubSectionExampleSnippet = ` "use client"; import { useState } from "react"; import { Section } from "@calcom/ui/components/section"; import { Switch } from "@calcom/ui/components/form"; const SectionWithSubsections = () => { const [isMainOpen, setIsMainOpen] = useState(true); const [isFirstSubsectionOpen, setIsFirstSubsectionOpen] = useState(true); const [isSecondSubsectionOpen, setIsSecondSubsectionOpen] = useState(true); return (
{isMainOpen && ( {isFirstSubsectionOpen && (

This is the content of the first subsection.

)}
{isSecondSubsectionOpen && (
Field Name
Field Type
Value
When to Write
)}
)}
); }; `;