Skip to content

Commit

Permalink
refactor: rename panel name
Browse files Browse the repository at this point in the history
  • Loading branch information
dulapahv committed Dec 26, 2024
1 parent 372299a commit 9bc24df
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions client/src/components/sandpack/components/help-popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ const HelpPopover = () => (
className="size-7 rounded-full border-[color:var(--sp-colors-surface3)] bg-[color:var(--sp-colors-surface2)] p-0 text-[color:var(--sp-colors-clickable)] hover:bg-[color:var(--sp-colors-surface3)] hover:text-[color:var(--sp-colors-hover)]"
>
<CircleHelp className="size-4" />
<span className="sr-only">Help with code preview</span>
<span className="sr-only">Help with live preview</span>
</Button>
</TooltipTrigger>
</PopoverTrigger>
<TooltipContent>
<p>Help with code preview</p>
<p>Help with live preview</p>
</TooltipContent>
</Tooltip>
<PopoverContent className="mr-1 w-96 overflow-auto [@media(max-height:800px)]:max-h-96">
<div className="space-y-4">
<div className="space-y-2">
<h4 className="font-medium leading-none">Code Preview</h4>
<h4 className="font-medium leading-none">Live Preview</h4>
<div className="space-y-4 text-sm text-muted-foreground">
<div>
<h5 className="mb-2 font-medium">Usage Instructions</h5>
Expand Down Expand Up @@ -70,7 +70,7 @@ const HelpPopover = () => (
rel="noopener noreferrer"
className="inline-flex items-center gap-1 text-foreground underline underline-offset-2 !transition-all hover:text-muted-foreground"
>
See code preview examples
See live preview examples
<span className="sr-only">(opens in new tab)</span>
</a>
</li>
Expand Down
6 changes: 3 additions & 3 deletions client/src/components/toolbar/components/desktop-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,10 @@ const DesktopMenu = ({
Minimap
</MenubarCheckboxItem>
<MenubarCheckboxItem
onCheckedChange={actions.toggleMarkdownPanel}
onCheckedChange={actions.toggleNotepadPanel}
checked={markdown}
>
Markdown Editor
Notepad
</MenubarCheckboxItem>
<MenubarCheckboxItem
onCheckedChange={actions.toggleTerminalPanel}
Expand All @@ -188,7 +188,7 @@ const DesktopMenu = ({
onCheckedChange={actions.toggleSandpackPanel}
checked={sandpack}
>
Code Preview
Live Preview
</MenubarCheckboxItem>
</MenubarContent>
</MenubarMenu>
Expand Down
6 changes: 3 additions & 3 deletions client/src/components/toolbar/components/mobile-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,10 @@ const MobileMenu = ({
Minimap
</MenubarCheckboxItem>
<MenubarCheckboxItem
onCheckedChange={actions.toggleMarkdownPanel}
onCheckedChange={actions.toggleNotepadPanel}
checked={markdown}
>
Markdown Editor
Notepad
</MenubarCheckboxItem>
<MenubarCheckboxItem
onCheckedChange={actions.toggleTerminalPanel}
Expand All @@ -173,7 +173,7 @@ const MobileMenu = ({
onCheckedChange={actions.toggleSandpackPanel}
checked={sandpack}
>
Code Preview
Live Preview
</MenubarCheckboxItem>
</MenubarSubContent>
</MenubarSub>
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/toolbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ const Toolbar = ({
editor.updateOptions({ minimap: { enabled: !miniMap } });
setMiniMap(!miniMap);
},
toggleMarkdownPanel: () => setShowMarkdown((show) => !show),
toggleNotepadPanel: () => setShowMarkdown((show) => !show),
toggleTerminalPanel: () => setShowTerminal((show) => !show),
toggleWebcamPanel: () => setShowWebcam((show) => !show),
toggleSandpackPanel: () => setShowSandpack((show) => !show),
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/toolbar/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ export interface ToolbarActions {
commandPalette: () => void;
/** Toggle minimap visibility */
minimap: () => void;
/** Toggle markdown editor panel */
toggleMarkdownPanel: () => void;
/** Toggle notepad panel */
toggleNotepadPanel: () => void;
/** Toggle terminal panel */
toggleTerminalPanel: () => void;
/** Toggle webcam stream panel */
Expand Down

1 comment on commit 9bc24df

@vercel
Copy link

@vercel vercel bot commented on 9bc24df Dec 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.