mirror of
https://github.com/fleetdm/fleet
synced 2026-04-26 07:57:29 +00:00
relates to #21775 > NOTE: there still needs to be integrated with the API when this work is done. Adds the UI for adding Fleet maintained applications. This includes: **the view to see all the fleet maintained apps**  **The fleet maintained app details Page:**  <!-- Note that API documentation changes are now addressed by the product design team. --> - [x] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files) for more information. - [ ] Added/updated tests - [ ] Manual QA for all new/changed functionality
40 lines
856 B
TypeScript
40 lines
856 B
TypeScript
import React, { ReactNode } from "react";
|
|
|
|
import classnames from "classnames";
|
|
|
|
interface IHeaderCellProps {
|
|
value: ReactNode;
|
|
isSortedDesc?: boolean;
|
|
disableSortBy?: boolean;
|
|
tootip?: ReactNode;
|
|
}
|
|
|
|
const HeaderCell = ({
|
|
value,
|
|
isSortedDesc,
|
|
disableSortBy,
|
|
tootip,
|
|
}: IHeaderCellProps): JSX.Element => {
|
|
let sortArrowClass = "";
|
|
if (isSortedDesc === undefined) {
|
|
sortArrowClass = "";
|
|
} else if (isSortedDesc) {
|
|
sortArrowClass = "descending";
|
|
} else {
|
|
sortArrowClass = "ascending";
|
|
}
|
|
|
|
return (
|
|
<div className={classnames("header-cell", sortArrowClass)}>
|
|
<span>{value}</span>
|
|
{!disableSortBy && (
|
|
<div className="sort-arrows">
|
|
<span className="ascending-arrow" />
|
|
<span className="descending-arrow" />
|
|
</div>
|
|
)}
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default HeaderCell;
|