mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-04-22 01:00:02 +02:00
updates DocStringComponent placement
This commit is contained in:
parent
0343abd0b0
commit
0e9832e2f1
@ -102,14 +102,12 @@ export const AsyncMethodComponent = React.memo((props: AsyncMethodProps) => {
|
|||||||
{process.env.NODE_ENV === 'development' && (
|
{process.env.NODE_ENV === 'development' && (
|
||||||
<div>Render count: {renderCount.current}</div>
|
<div>Render count: {renderCount.current}</div>
|
||||||
)}
|
)}
|
||||||
<h5>
|
<h5>Function: {displayName}</h5>
|
||||||
Function: {displayName}
|
|
||||||
<DocStringComponent docString={docString} />
|
|
||||||
</h5>
|
|
||||||
<Form onSubmit={execute} ref={formRef}>
|
<Form onSubmit={execute} ref={formRef}>
|
||||||
{args}
|
{args}
|
||||||
<Button id={`button-${id}`} name={name} value={parentPath} type="submit">
|
<Button id={`button-${id}`} name={name} value={parentPath} type="submit">
|
||||||
{runningTask ? 'Stop' : 'Start'}
|
{runningTask ? 'Stop ' : 'Start '}
|
||||||
|
<DocStringComponent docString={docString} />
|
||||||
</Button>
|
</Button>
|
||||||
</Form>
|
</Form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -48,7 +48,6 @@ export const ButtonComponent = React.memo((props: ButtonComponentProps) => {
|
|||||||
<div>Render count: {renderCount.current}</div>
|
<div>Render count: {renderCount.current}</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<DocStringComponent docString={docString} />
|
|
||||||
<ToggleButton
|
<ToggleButton
|
||||||
id={`toggle-check-${id}`}
|
id={`toggle-check-${id}`}
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
@ -58,6 +57,7 @@ export const ButtonComponent = React.memo((props: ButtonComponentProps) => {
|
|||||||
disabled={readOnly}
|
disabled={readOnly}
|
||||||
onChange={(e) => setChecked(e.currentTarget.checked)}>
|
onChange={(e) => setChecked(e.currentTarget.checked)}>
|
||||||
{displayName}
|
{displayName}
|
||||||
|
<DocStringComponent docString={docString} />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -53,10 +53,12 @@ export const ColouredEnumComponent = React.memo((props: ColouredEnumComponentPro
|
|||||||
{process.env.NODE_ENV === 'development' && (
|
{process.env.NODE_ENV === 'development' && (
|
||||||
<div>Render count: {renderCount.current}</div>
|
<div>Render count: {renderCount.current}</div>
|
||||||
)}
|
)}
|
||||||
<DocStringComponent docString={docString} />
|
|
||||||
<Row>
|
<Row>
|
||||||
<Col className="d-flex align-items-center">
|
<Col className="d-flex align-items-center">
|
||||||
<InputGroup.Text>{displayName}</InputGroup.Text>
|
<InputGroup.Text>
|
||||||
|
{displayName}
|
||||||
|
<DocStringComponent docString={docString} />
|
||||||
|
</InputGroup.Text>
|
||||||
{readOnly ? (
|
{readOnly ? (
|
||||||
// Display the Form.Control when readOnly is true
|
// Display the Form.Control when readOnly is true
|
||||||
<Form.Control
|
<Form.Control
|
||||||
|
@ -52,10 +52,12 @@ export const EnumComponent = React.memo((props: EnumComponentProps) => {
|
|||||||
{process.env.NODE_ENV === 'development' && (
|
{process.env.NODE_ENV === 'development' && (
|
||||||
<div>Render count: {renderCount.current}</div>
|
<div>Render count: {renderCount.current}</div>
|
||||||
)}
|
)}
|
||||||
<DocStringComponent docString={docString} />
|
|
||||||
<Row>
|
<Row>
|
||||||
<Col className="d-flex align-items-center">
|
<Col className="d-flex align-items-center">
|
||||||
<InputGroup.Text>{displayName}</InputGroup.Text>
|
<InputGroup.Text>
|
||||||
|
{displayName}
|
||||||
|
<DocStringComponent docString={docString} />
|
||||||
|
</InputGroup.Text>
|
||||||
<Form.Select
|
<Form.Select
|
||||||
aria-label="Default select example"
|
aria-label="Default select example"
|
||||||
value={value}
|
value={value}
|
||||||
|
@ -95,7 +95,7 @@ export const GenericComponent = React.memo(
|
|||||||
<SliderComponent
|
<SliderComponent
|
||||||
name={name}
|
name={name}
|
||||||
parentPath={parentPath}
|
parentPath={parentPath}
|
||||||
docString={attribute.doc}
|
docString={attribute.value['value'].doc}
|
||||||
readOnly={attribute.readonly}
|
readOnly={attribute.readonly}
|
||||||
value={attribute.value['value']}
|
value={attribute.value['value']}
|
||||||
min={attribute.value['min']}
|
min={attribute.value['min']}
|
||||||
@ -179,7 +179,7 @@ export const GenericComponent = React.memo(
|
|||||||
parentPath={parentPath}
|
parentPath={parentPath}
|
||||||
value={attribute.value['value']['value'] as string}
|
value={attribute.value['value']['value'] as string}
|
||||||
readOnly={attribute.readonly}
|
readOnly={attribute.readonly}
|
||||||
docString={attribute.doc}
|
docString={attribute.value['value'].doc}
|
||||||
// Add any other specific props for the ImageComponent here
|
// Add any other specific props for the ImageComponent here
|
||||||
format={attribute.value['format']['value'] as string}
|
format={attribute.value['format']['value'] as string}
|
||||||
addNotification={addNotification}
|
addNotification={addNotification}
|
||||||
|
@ -48,14 +48,15 @@ export const ImageComponent = React.memo((props: ImageComponentProps) => {
|
|||||||
onClick={() => setOpen(!open)}
|
onClick={() => setOpen(!open)}
|
||||||
style={{ cursor: 'pointer' }} // Change cursor style on hover
|
style={{ cursor: 'pointer' }} // Change cursor style on hover
|
||||||
>
|
>
|
||||||
{displayName} {open ? <ChevronDown /> : <ChevronRight />}
|
{displayName}
|
||||||
|
<DocStringComponent docString={docString} />
|
||||||
|
{open ? <ChevronDown /> : <ChevronRight />}
|
||||||
</Card.Header>
|
</Card.Header>
|
||||||
<Collapse in={open}>
|
<Collapse in={open}>
|
||||||
<Card.Body>
|
<Card.Body>
|
||||||
{process.env.NODE_ENV === 'development' && (
|
{process.env.NODE_ENV === 'development' && (
|
||||||
<p>Render count: {renderCount.current}</p>
|
<p>Render count: {renderCount.current}</p>
|
||||||
)}
|
)}
|
||||||
<DocStringComponent docString={docString} />
|
|
||||||
{/* Your component JSX here */}
|
{/* Your component JSX here */}
|
||||||
{format === '' && value === '' ? (
|
{format === '' && value === '' ? (
|
||||||
<p>No image set in the backend.</p>
|
<p>No image set in the backend.</p>
|
||||||
|
@ -89,12 +89,12 @@ export const MethodComponent = React.memo((props: MethodProps) => {
|
|||||||
)}
|
)}
|
||||||
<h5 onClick={() => setHideOutput(!hideOutput)} style={{ cursor: 'pointer' }}>
|
<h5 onClick={() => setHideOutput(!hideOutput)} style={{ cursor: 'pointer' }}>
|
||||||
Function: {displayName}
|
Function: {displayName}
|
||||||
<DocStringComponent docString={docString} />
|
|
||||||
</h5>
|
</h5>
|
||||||
<Form onSubmit={execute}>
|
<Form onSubmit={execute}>
|
||||||
{args}
|
{args}
|
||||||
<Button variant="primary" type="submit">
|
<Button variant="primary" type="submit">
|
||||||
Execute
|
Execute
|
||||||
|
<DocStringComponent docString={docString} />
|
||||||
</Button>
|
</Button>
|
||||||
</Form>
|
</Form>
|
||||||
|
|
||||||
|
@ -313,10 +313,14 @@ export const NumberComponent = React.memo((props: NumberComponentProps) => {
|
|||||||
{process.env.NODE_ENV === 'development' && (
|
{process.env.NODE_ENV === 'development' && (
|
||||||
<div>Render count: {renderCount.current}</div>
|
<div>Render count: {renderCount.current}</div>
|
||||||
)}
|
)}
|
||||||
<DocStringComponent docString={docString} />
|
|
||||||
<div className="d-flex">
|
<div className="d-flex">
|
||||||
<InputGroup>
|
<InputGroup>
|
||||||
{showName && <InputGroup.Text>{displayName}</InputGroup.Text>}
|
{showName && (
|
||||||
|
<InputGroup.Text>
|
||||||
|
{displayName}
|
||||||
|
<DocStringComponent docString={docString} />
|
||||||
|
</InputGroup.Text>
|
||||||
|
)}
|
||||||
<Form.Control
|
<Form.Control
|
||||||
type="text"
|
type="text"
|
||||||
value={inputString}
|
value={inputString}
|
||||||
|
@ -105,10 +105,12 @@ export const SliderComponent = React.memo((props: SliderComponentProps) => {
|
|||||||
<div>Render count: {renderCount.current}</div>
|
<div>Render count: {renderCount.current}</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<DocStringComponent docString={docString} />
|
|
||||||
<Row>
|
<Row>
|
||||||
<Col xs="auto" xl="auto">
|
<Col xs="auto" xl="auto">
|
||||||
<InputGroup.Text>{displayName}</InputGroup.Text>
|
<InputGroup.Text>
|
||||||
|
{displayName}
|
||||||
|
<DocStringComponent docString={docString} />
|
||||||
|
</InputGroup.Text>
|
||||||
</Col>
|
</Col>
|
||||||
<Col xs="5" xl>
|
<Col xs="5" xl>
|
||||||
<Slider
|
<Slider
|
||||||
|
@ -70,9 +70,11 @@ export const StringComponent = React.memo((props: StringComponentProps) => {
|
|||||||
{process.env.NODE_ENV === 'development' && (
|
{process.env.NODE_ENV === 'development' && (
|
||||||
<div>Render count: {renderCount.current}</div>
|
<div>Render count: {renderCount.current}</div>
|
||||||
)}
|
)}
|
||||||
<DocStringComponent docString={docString} />
|
|
||||||
<InputGroup>
|
<InputGroup>
|
||||||
<InputGroup.Text>{displayName}</InputGroup.Text>
|
<InputGroup.Text>
|
||||||
|
{displayName}
|
||||||
|
<DocStringComponent docString={docString} />
|
||||||
|
</InputGroup.Text>
|
||||||
<Form.Control
|
<Form.Control
|
||||||
type="text"
|
type="text"
|
||||||
value={inputString}
|
value={inputString}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user