mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-04-20 08:20:02 +02:00
removes card header of root component
This commit is contained in:
parent
838145a778
commit
8042f9b390
@ -39,19 +39,16 @@ export const DataServiceComponent = React.memo(
|
|||||||
displayName = webSettings[fullAccessPath].displayName;
|
displayName = webSettings[fullAccessPath].displayName;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
if (displayName !== '') {
|
||||||
<div className="component dataServiceComponent" id={id}>
|
return (
|
||||||
<Card>
|
<div className="component dataServiceComponent" id={id}>
|
||||||
<Card.Header
|
<Card>
|
||||||
onClick={() => setOpen(!open)}
|
<Card.Header onClick={() => setOpen(!open)} style={{ cursor: 'pointer' }}>
|
||||||
style={{ cursor: 'pointer' }} // Change cursor style on hover
|
{displayName} {open ? <ChevronDown /> : <ChevronRight />}
|
||||||
>
|
</Card.Header>
|
||||||
{displayName} {open ? <ChevronDown /> : <ChevronRight />}
|
<Collapse in={open}>
|
||||||
</Card.Header>
|
<Card.Body>
|
||||||
<Collapse in={open}>
|
{Object.entries(props).map(([key, value]) => (
|
||||||
<Card.Body>
|
|
||||||
{Object.entries(props).map(([key, value]) => {
|
|
||||||
return (
|
|
||||||
<GenericComponent
|
<GenericComponent
|
||||||
key={key}
|
key={key}
|
||||||
attribute={value}
|
attribute={value}
|
||||||
@ -60,12 +57,27 @@ export const DataServiceComponent = React.memo(
|
|||||||
isInstantUpdate={isInstantUpdate}
|
isInstantUpdate={isInstantUpdate}
|
||||||
addNotification={addNotification}
|
addNotification={addNotification}
|
||||||
/>
|
/>
|
||||||
);
|
))}
|
||||||
})}
|
</Card.Body>
|
||||||
</Card.Body>
|
</Collapse>
|
||||||
</Collapse>
|
</Card>
|
||||||
</Card>
|
</div>
|
||||||
</div>
|
);
|
||||||
);
|
} else {
|
||||||
|
return (
|
||||||
|
<div className="component dataServiceComponent" id={id}>
|
||||||
|
{Object.entries(props).map(([key, value]) => (
|
||||||
|
<GenericComponent
|
||||||
|
key={key}
|
||||||
|
attribute={value}
|
||||||
|
name={key}
|
||||||
|
parentPath={fullAccessPath}
|
||||||
|
isInstantUpdate={isInstantUpdate}
|
||||||
|
addNotification={addNotification}
|
||||||
|
/>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user