Skip to content
This repository has been archived by the owner on Jan 19, 2025. It is now read-only.

Commit

Permalink
Merge pull request #61 from lars-reimann/api-editor-55
Browse files Browse the repository at this point in the history
api-editor-55 Path durch Breadcrumb aus React-Bootstrap ersetzen
  • Loading branch information
lars-reimann authored Jun 20, 2021
2 parents 31aae91 + a3b317e commit a69f6d0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
7 changes: 0 additions & 7 deletions client/src/Components/ParameterView/ParameterView.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
.parameter-view {
padding: 1rem;
position: -webkit-sticky;
position: sticky;
top: 0;
overflow-x: hidden;
}

Expand Down Expand Up @@ -65,7 +62,3 @@
.documentation-text {
clear: both;
}

.parameter-view-path {
height: 1.5rem;
}
13 changes: 9 additions & 4 deletions client/src/Components/ParameterView/ParameterView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import React from "react";
import PythonParameter from "../../model/PythonParameter";
import PythonFunction from "../../model/PythonFunction";
import DocumentationText from "./DocumentationText";
import {Breadcrumb} from "react-bootstrap";

type ParameterViewProps = {
inputParameters: PythonParameter[],
Expand All @@ -17,10 +18,14 @@ export default function ParameterView({inputParameters, selection, selectedFunct
return (
<div className="parameter-view">
<div className="parameter-view-path">
{selection.length > 0 ?
selection.map<React.ReactNode>((n, index) => <a href="#" key={index}>{n}</a>)
.reduce((p, c, index) => [p, (<span key={index}> / </span>), c]) :
""}
<Breadcrumb>
{(!selection || selection.length === 0) && (
<Breadcrumb.Item active>Nothing selected.</Breadcrumb.Item>
)}
{selection.map((name, index) => (
<Breadcrumb.Item active key={index}>{name}</Breadcrumb.Item>
))}
</Breadcrumb>
</div>
{selectedFunction !== null &&
<>
Expand Down

0 comments on commit a69f6d0

Please sign in to comment.