import { useState } from 'react'; import React from 'react'; import { Card, Collapse } from 'react-bootstrap'; import { ChevronDown, ChevronRight } from 'react-bootstrap-icons'; import { Attribute, GenericComponent } from './GenericComponent'; type DataServiceProps = { props: DataServiceJSON; parentPath?: string; isInstantUpdate: boolean; addNotification: (message: string) => void; }; export type DataServiceJSON = Record; export const DataServiceComponent = React.memo( ({ props, parentPath = 'DataService', isInstantUpdate, addNotification }: DataServiceProps) => { const [open, setOpen] = useState(true); return (
setOpen(!open)} style={{ cursor: 'pointer' }} // Change cursor style on hover > {parentPath} {open ? : } {Object.entries(props).map(([key, value]) => { return ( ); })}
); } );