mirror of
https://github.com/fleetdm/fleet
synced 2026-04-21 21:47:20 +00:00
For #25464 Implements the UI for viewing certification details on the host details and my device pages. This includes: **Certs card and table on host details and my device page**  **Cert details modal**  - includes some work around normalising the details section card header styles on these pages. - includes extending DataSet component to add a `horizontal` orientation when rendering the data > NOTE: We still need to integrate with the API endpoints when they are ready. - [x] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. - [ ] Added/updated automated tests - [x] Manual QA for all new/changed functionality
34 lines
666 B
TypeScript
34 lines
666 B
TypeScript
import React from "react";
|
|
import classnames from "classnames";
|
|
|
|
const baseClass = "data-set";
|
|
|
|
interface IDataSetProps {
|
|
title: React.ReactNode;
|
|
value: React.ReactNode;
|
|
orientation?: "horizontal" | "vertical";
|
|
className?: string;
|
|
}
|
|
|
|
const DataSet = ({
|
|
title,
|
|
value,
|
|
orientation = "vertical",
|
|
className,
|
|
}: IDataSetProps) => {
|
|
const classNames = classnames(baseClass, className, {
|
|
[`${baseClass}__horizontal`]: orientation === "horizontal",
|
|
});
|
|
|
|
return (
|
|
<div className={classNames}>
|
|
<dt>
|
|
{title}
|
|
{orientation === "horizontal" && ":"}
|
|
</dt>
|
|
<dd>{value}</dd>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default DataSet;
|