Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
gitpod-io
GitHub Repository: gitpod-io/gitpod
Path: blob/main/components/dashboard/src/admin/Property.tsx
2500 views
1
/**
2
* Copyright (c) 2022 Gitpod GmbH. All rights reserved.
3
* Licensed under the GNU Affero General Public License (AGPL).
4
* See License.AGPL.txt in the project root for license information.
5
*/
6
7
import { ReactNode } from "react";
8
9
function Property(p: { name: string; children: ReactNode; actions?: { label: string; onClick: () => void }[] }) {
10
return (
11
<div className="flex flex-col w-4/12">
12
<div className="text-base text-gray-500">{p.name}</div>
13
<div className="mr-3 text-lg text-gray-600 font-semibold">{p.children}</div>
14
{(p.actions || []).map((a) => (
15
<div
16
className="cursor-pointer text-sm text-blue-400 dark:text-blue-600 hover:text-blue-600 dark:hover:text-blue-400 truncate"
17
onClick={a.onClick}
18
>
19
{a.label || ""}
20
</div>
21
))}
22
</div>
23
);
24
}
25
26
export default Property;
27
28