fleet/frontend/pages/ManageControlsPage/components/UploadList/UploadList.tsx
Gabriel Hernandez b8fa08b53c
implement mdm scripts page UI (#10092)
relates to #9831

Implements the mdm mac OS scripts UI. This is just the UI atm and is not
accessible in the application at the moment.
2023-03-06 15:03:48 +00:00

34 lines
820 B
TypeScript

import React from "react";
const baseClass = "upload-list";
interface IUploadListProps {
listItems: any[]; // TODO: typings
HeadingComponent: (props: any) => JSX.Element; // TODO: Typings
ListItemComponent: (props: { listItem: any }) => JSX.Element; // TODO: types
}
const UploadList = ({
listItems,
HeadingComponent,
ListItemComponent,
}: IUploadListProps) => {
const items = listItems.map((listItem) => {
return (
<li key={`${listItem.id}`} className={`${baseClass}__list-item`}>
<ListItemComponent listItem={listItem} />
</li>
);
});
return (
<div className={baseClass}>
<div className={`${baseClass}__header`}>
<HeadingComponent />
</div>
<ul className={`${baseClass}__list`}>{items}</ul>
</div>
);
};
export default UploadList;