mirror of
https://github.com/fleetdm/fleet
synced 2026-04-21 13:37:30 +00:00
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.
34 lines
820 B
TypeScript
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;
|