diff --git a/src/frontend/src/components/details/ItemDetails.tsx b/src/frontend/src/components/details/ItemDetails.tsx deleted file mode 100644 index 543c23964e..0000000000 --- a/src/frontend/src/components/details/ItemDetails.tsx +++ /dev/null @@ -1,96 +0,0 @@ -import { Grid, Group, Paper, SimpleGrid } from '@mantine/core'; -import React from 'react'; - -import { UserRoles } from '../../enums/Roles'; -import { DetailsField, DetailsTable } from './Details'; -import { DetailImageButtonProps, DetailsImage } from './DetailsImage'; - -/** - * Type for defining field arrays - */ -export type ItemDetailFields = { - left: DetailsField[][]; - right?: DetailsField[][]; - bottom_left?: DetailsField[][]; - bottom_right?: DetailsField[][]; - image?: DetailsImageType; -}; - -/** - * Type for defining details image - */ -export type DetailsImageType = { - name: string; - imageActions: DetailImageButtonProps; -}; - -export function ItemDetailsGrid(props: React.PropsWithChildren<{}>) { - return ( - - - {props.children} - - - ); -} - -/** - * Render a Details panel of the given model - * @param params Object with the data of the model to render - * @param apiPath Path to use for image updating - * @param refresh useInstance refresh method to refresh when making updates - * @param fields Object with all field sections - * @param partModel set to true only if source model is Part - */ -export function ItemDetails({ - appRole, - params = {}, - apiPath, - refresh, - fields, - partModel = false -}: { - appRole: UserRoles; - params?: any; - apiPath: string; - refresh: () => void; - fields: ItemDetailFields; - partModel: boolean; -}) { - return ( - - - - {fields.image && ( - - - - )} - - {fields.left && ( - - )} - - - {fields.right && } - {fields.bottom_left && ( - - )} - {fields.bottom_right && ( - - )} - - - ); -}