Skip to content

Commit

Permalink
Update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
brentyi committed Oct 4, 2023
1 parent 3e7045c commit 2fe48a5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions src/viser/client/src/ControlPanel/BottomPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const BottomPanelContext = React.createContext<null | {
toggleExpanded: () => void;
}>(null);

/** A bottom panel is used to display the controls on mobile devices. */
export default function BottomPanel({
children,
}: {
Expand Down Expand Up @@ -77,6 +78,7 @@ BottomPanel.Handle = function BottomPanelHandle({
</Box>
);
};

/** Contents of a panel. */
BottomPanel.Contents = function BottomPanelContents({
children,
Expand Down
6 changes: 3 additions & 3 deletions src/viser/client/src/ControlPanel/FloatingPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ const FloatingPanelContext = React.createContext<null | {
}>;
}>(null);

/** Root component for control panel. Parents a set of control tabs.
* This could be refactored+cleaned up a lot! */
/** A floating panel for displaying controls. */
export default function FloatingPanel({
children,
}: {
Expand Down Expand Up @@ -289,7 +288,8 @@ FloatingPanel.Contents = function FloatingPanelContents({
<Collapse in={context.expanded}>
<ScrollArea.Autosize mah={context!.maxHeight}>
<Box
/* Prevent internals from getting too wide. */
/* Prevent internals from getting too wide. Hardcoded to match the
* width of the wrapper element above. */
w="20em"
>
{children}
Expand Down
6 changes: 3 additions & 3 deletions src/viser/client/src/ControlPanel/SidebarPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ export const SidebarPanelContext = React.createContext<null | {
toggleCollapsed: () => void;
}>(null);

/** Root component for control panel. Parents a set of control tabs.
* This could be refactored+cleaned up a lot! */
/** A fixed or collapsible side panel for displaying controls. */
export default function SidebarPanel({
children,
collapsible,
Expand Down Expand Up @@ -73,7 +72,8 @@ export default function SidebarPanel({
}}
>
<Box
/* Prevent DOM reflow, as well as internals from getting too wide. */
/* Prevent DOM reflow, as well as internals from getting too wide.
* Hardcoded to match the width of the wrapper element above. */
w="20em"
>
{children}
Expand Down

0 comments on commit 2fe48a5

Please sign in to comment.