Skip to content

Commit d9c51ed

Browse files
committed
Hid tiptap
1 parent 3f723d3 commit d9c51ed

File tree

2 files changed

+38
-40
lines changed

2 files changed

+38
-40
lines changed

apps/master-sample-app/components/sidebar.tsx

Lines changed: 34 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -168,59 +168,57 @@ export function Sidebar({ isOpen, onToggle, currentSampleId, onSampleSelect }: S
168168
</div>
169169
)}
170170
</div>
171-
)}
172-
</div>
173171
)}
174-
175-
{/* Text Editors Section */}
172+
</div>
173+
)}
174+
175+
{/* Text Editors Section - Hidden for now */}
176+
{/* <button
177+
onClick={() => toggleSection("textEditors")}
178+
className="flex w-full items-center justify-between rounded-xl px-3 py-2.5 text-sm font-mono text-sidebar-foreground bg-sidebar-accent/50"
179+
>
180+
<span>Text Editors</span>
181+
<ChevronRight className={cn("h-4 w-4 transition-transform", expandedSections.textEditors && "rotate-90")} />
182+
</button>
183+
{expandedSections.textEditors && (
184+
<div className="mt-2 ml-2 space-y-1">
176185
<button
177-
onClick={() => toggleSection("textEditors")}
178-
className="flex w-full items-center justify-between rounded-xl px-3 py-2.5 text-sm font-mono text-sidebar-foreground bg-sidebar-accent/50"
186+
onClick={() => toggleSection("textEditorLibraries")}
187+
className="flex w-full items-center justify-between rounded-xl px-3 py-2.5 text-sm font-mono text-sidebar-foreground bg-sidebar-accent/30"
179188
>
180-
<span>Text Editors</span>
181-
<ChevronRight className={cn("h-4 w-4 transition-transform", expandedSections.textEditors && "rotate-90")} />
189+
<span>Libraries</span>
190+
<ChevronRight className={cn("h-4 w-4 transition-transform", expandedSections.textEditorLibraries && "rotate-90")} />
182191
</button>
183-
{expandedSections.textEditors && (
192+
{expandedSections.textEditorLibraries && (
184193
<div className="mt-2 ml-2 space-y-1">
185-
{/* Text Editor Libraries Section */}
186194
<button
187-
onClick={() => toggleSection("textEditorLibraries")}
188-
className="flex w-full items-center justify-between rounded-xl px-3 py-2.5 text-sm font-mono text-sidebar-foreground bg-sidebar-accent/30"
195+
onClick={() => toggleSection("tiptap")}
196+
className="flex w-full items-center justify-between rounded-xl px-3 py-2.5 text-sm font-mono text-sidebar-foreground bg-sidebar-accent/20"
189197
>
190-
<span>Libraries</span>
191-
<ChevronRight className={cn("h-4 w-4 transition-transform", expandedSections.textEditorLibraries && "rotate-90")} />
198+
<span>TipTap</span>
199+
<ChevronRight className={cn("h-4 w-4 transition-transform", expandedSections.tiptap && "rotate-90")} />
192200
</button>
193-
{expandedSections.textEditorLibraries && (
201+
{expandedSections.tiptap && (
194202
<div className="mt-2 ml-2 space-y-1">
195-
{/* TipTap Section */}
196203
<button
197-
onClick={() => toggleSection("tiptap")}
198-
className="flex w-full items-center justify-between rounded-xl px-3 py-2.5 text-sm font-mono text-sidebar-foreground bg-sidebar-accent/20"
204+
onClick={() => {
205+
setSelectedItem("tiptap-demo")
206+
onSampleSelect?.("react-text-editors-libraries-tiptap-tiptap-demo")
207+
}}
208+
className={cn(
209+
"w-full rounded-lg px-3 py-2.5 text-left text-sm font-mono text-sidebar-foreground transition-colors",
210+
selectedItem === "tiptap-demo" ? "bg-secondary" : "hover:bg-secondary/50",
211+
)}
199212
>
200-
<span>TipTap</span>
201-
<ChevronRight className={cn("h-4 w-4 transition-transform", expandedSections.tiptap && "rotate-90")} />
213+
tiptap-demo
202214
</button>
203-
{expandedSections.tiptap && (
204-
<div className="mt-2 ml-2 space-y-1">
205-
<button
206-
onClick={() => {
207-
setSelectedItem("tiptap-demo")
208-
onSampleSelect?.("react-text-editors-libraries-tiptap-tiptap-demo")
209-
}}
210-
className={cn(
211-
"w-full rounded-lg px-3 py-2.5 text-left text-sm font-mono text-sidebar-foreground transition-colors",
212-
selectedItem === "tiptap-demo" ? "bg-secondary" : "hover:bg-secondary/50",
213-
)}
214-
>
215-
tiptap-demo
216-
</button>
217-
</div>
218-
)}
219215
</div>
220216
)}
221217
</div>
222218
)}
223219
</div>
220+
)} */}
221+
</div>
224222
</>
225223
) : (
226224
<>

apps/master-sample-app/samples/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ export const SAMPLES: Record<string, Sample> = {
1515
metadata: reactflowCrdtMeta,
1616
codeFiles: reactflowCrdtCodeFiles
1717
},
18-
'react-text-editors-libraries-tiptap-tiptap-demo': {
19-
metadata: tiptapDemoMeta,
20-
codeFiles: tiptapDemoCodeFiles
21-
}
18+
// 'react-text-editors-libraries-tiptap-tiptap-demo': {
19+
// metadata: tiptapDemoMeta,
20+
// codeFiles: tiptapDemoCodeFiles
21+
// }
2222
}
2323

2424
export function getSampleById(id: string): Sample | undefined {

0 commit comments

Comments
 (0)