Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

"No Documentation available" Wenn docstring leer #43

Merged
merged 2 commits into from
Jun 17, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion client/src/Components/ParameterView/ParameterNode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ import { Dropdown } from "react-bootstrap";
type ParameterProps = {inputParameter: PythonParameter}

const ParameterNode = ({inputParameter}: ParameterProps) => {

const hasDescription = !!inputParameter.docstring;

return (
<div className="parametersList">
<span className="parameter-header">
Expand All @@ -21,7 +24,15 @@ const ParameterNode = ({inputParameter}: ParameterProps) => {
</Dropdown.Menu>
</Dropdown>
</span>
<DocumentationText inputText={inputParameter?.docstring}/>
{
hasDescription &&
<DocumentationText inputText={inputParameter?.docstring}/>
}
{
!hasDescription &&
<p>No Documentation available</p>
}

</div>
);
};
Expand Down