Skip to content

Commit be1849e

Browse files
jankeromnesroboquat
authored andcommitted
[dashboard] Rename DropDown 'contextMenuWidth' → 'customClasses' to reflect reality
1 parent 516ed61 commit be1849e

File tree

10 files changed

+16
-13
lines changed

10 files changed

+16
-13
lines changed

components/dashboard/src/Menu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ export default function Menu() {
281281
)}
282282
<div className="flex h-full rounded-lg hover:bg-gray-100 dark:hover:bg-gray-800">
283283
<ContextMenu
284-
classes="w-64 left-0"
284+
customClasses="w-64 left-0"
285285
menuEntries={[
286286
{
287287
title: userFullName,

components/dashboard/src/admin/TeamDetail.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export default function TeamDetail(props: { team: Team }) {
125125
<ItemField className="flex items-center my-auto">
126126
<span className="text-gray-400 capitalize">
127127
<DropDown
128-
contextMenuWidth="w-32"
128+
customClasses="w-32"
129129
activeEntry={m.role}
130130
entries={[
131131
{

components/dashboard/src/components/ContextMenu.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { Link } from "react-router-dom";
1111
export interface ContextMenuProps {
1212
children?: React.ReactChild[] | React.ReactChild;
1313
menuEntries: ContextMenuEntry[];
14-
classes?: string;
14+
customClasses?: string;
1515
}
1616

1717
export interface ContextMenuEntry {
@@ -98,7 +98,7 @@ function ContextMenu(props: ContextMenuProps) {
9898
{expanded ? (
9999
<div
100100
className={`mt-2 z-50 bg-white dark:bg-gray-900 absolute flex flex-col border border-gray-200 dark:border-gray-800 rounded-lg truncated ${
101-
props.classes || "w-48 right-0"
101+
props.customClasses || "w-48 right-0"
102102
}`}
103103
data-analytics='{"button_type":"context_menu"}'
104104
>

components/dashboard/src/components/DropDown.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import ContextMenu from "./ContextMenu";
1010

1111
export interface DropDownProps {
1212
prefix?: string;
13-
contextMenuWidth?: string;
13+
customClasses?: string;
1414
activeEntry?: string;
1515
entries: DropDownEntry[];
1616
}
@@ -38,7 +38,7 @@ function DropDown(props: DropDownProps) {
3838
const font =
3939
"text-gray-400 dark:text-gray-500 text-sm leading-1 group hover:text-gray-600 dark:hover:text-gray-400 transition ease-in-out";
4040
return (
41-
<ContextMenu menuEntries={enhancedEntries} classes={`${props.contextMenuWidth} right-0`}>
41+
<ContextMenu menuEntries={enhancedEntries} customClasses={`${props.customClasses} right-0`}>
4242
<span className={`py-2 cursor-pointer ${font}`}>
4343
{props.prefix}
4444
{current}

components/dashboard/src/components/PendingChangesDropdown.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export default function PendingChangesDropdown(props: { workspaceInstance?: Work
4141
return <div className="text-sm text-gray-400 dark:text-gray-500">No Changes</div>;
4242
}
4343
return (
44-
<ContextMenu menuEntries={menuEntries} classes="w-64 max-h-48 overflow-scroll mx-auto left-0 right-0">
44+
<ContextMenu menuEntries={menuEntries} customClasses="w-64 max-h-48 overflow-scroll mx-auto left-0 right-0">
4545
<p className="flex justify-center text-gitpod-red">
4646
<span>
4747
{totalChanges} Change{totalChanges === 1 ? "" : "s"}

components/dashboard/src/projects/NewProject.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,10 @@ export default function NewProject() {
376376
</p>
377377
<div className={`mt-2 flex-col ${noReposAvailable && isGitHub() ? "w-96" : ""}`}>
378378
<div className="px-8 flex flex-col space-y-2" data-analytics='{"label":"Identity"}'>
379-
<ContextMenu classes="w-full left-0 cursor-pointer" menuEntries={getDropDownEntries(accounts)}>
379+
<ContextMenu
380+
customClasses="w-full left-0 cursor-pointer"
381+
menuEntries={getDropDownEntries(accounts)}
382+
>
380383
<div className="w-full">
381384
{!selectedAccount && user && user.name && user.avatarUrl && (
382385
<>

components/dashboard/src/projects/Prebuilds.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ export default function (props: { project?: Project; isAdminDashboard?: boolean
180180
</div>
181181
<div className="flex-1" />
182182
<div className="py-3 pl-3">
183-
<DropDown prefix="Prebuild Status: " contextMenuWidth="w-32" entries={statusFilterEntries()} />
183+
<DropDown prefix="Prebuild Status: " customClasses="w-32" entries={statusFilterEntries()} />
184184
</div>
185185
{!isLoadingPrebuilds && prebuilds.length === 0 && !props.isAdminDashboard && (
186186
<button onClick={() => triggerPrebuild(null)} className="ml-2">

components/dashboard/src/teams/Members.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ export default function () {
145145
<div className="py-3 pl-3">
146146
<DropDown
147147
prefix="Role: "
148-
contextMenuWidth="w-32"
148+
customClasses="w-32"
149149
activeEntry={roleFilter === "owner" ? "Owner" : roleFilter === "member" ? "Member" : "All"}
150150
entries={[
151151
{
@@ -226,7 +226,7 @@ export default function () {
226226
m.role
227227
) : (
228228
<DropDown
229-
contextMenuWidth="w-32"
229+
customClasses="w-32"
230230
activeEntry={m.role}
231231
entries={[
232232
{

components/dashboard/src/teams/TeamBilling.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ export default function TeamBilling() {
149149
<div className="flex space-x-1">
150150
<span>Select a new billing plan for this team. Currency:</span>
151151
<DropDown
152-
contextMenuWidth="w-32"
152+
customClasses="w-32"
153153
activeEntry={currency}
154154
entries={[
155155
{

components/dashboard/src/workspaces/Workspaces.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export default function () {
8585
<div className="py-3 pl-3">
8686
<DropDown
8787
prefix="Limit: "
88-
contextMenuWidth="w-32"
88+
customClasses="w-32"
8989
activeEntry={workspaceModel ? workspaceModel?.limit + "" : undefined}
9090
entries={[
9191
{

0 commit comments

Comments
 (0)