mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-04-21 00:40:01 +02:00
frontend: update style (fix button appearance)
This commit is contained in:
parent
dc1c7e80f4
commit
3cc6399f60
@ -12,14 +12,28 @@ input.instantUpdate {
|
|||||||
}
|
}
|
||||||
.navbarOffset {
|
.navbarOffset {
|
||||||
padding-top: 60px !important;
|
padding-top: 60px !important;
|
||||||
right: 20;
|
|
||||||
}
|
}
|
||||||
/* .toastContainer {
|
.toastContainer {
|
||||||
position: fixed;
|
position: fixed !important;
|
||||||
} */
|
padding: 5px;
|
||||||
|
}
|
||||||
.notificationToast {
|
.notificationToast {
|
||||||
background-color: rgba(114, 214, 253, 0.5) !important;
|
background-color: rgba(114, 214, 253, 0.5) !important;
|
||||||
}
|
}
|
||||||
.exceptionToast {
|
.exceptionToast {
|
||||||
background-color: rgba(216, 41, 18, 0.678) !important;
|
background-color: rgba(216, 41, 18, 0.678) !important;
|
||||||
}
|
}
|
||||||
|
.buttonComponent {
|
||||||
|
float: left !important;
|
||||||
|
margin-right: 10px !important;
|
||||||
|
}
|
||||||
|
.stringComponent {
|
||||||
|
float: left !important;
|
||||||
|
margin-right: 10px !important;
|
||||||
|
}
|
||||||
|
.numberComponent {
|
||||||
|
float: left !important;
|
||||||
|
margin-right: 10px !important;
|
||||||
|
width: 270px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ export const AsyncMethodComponent = React.memo((props: AsyncMethodProps) => {
|
|||||||
return (
|
return (
|
||||||
<div className="align-items-center asyncMethodComponent" id={id}>
|
<div className="align-items-center asyncMethodComponent" id={id}>
|
||||||
{process.env.NODE_ENV === 'development' && (
|
{process.env.NODE_ENV === 'development' && (
|
||||||
<p>Render count: {renderCount.current}</p>
|
<div>Render count: {renderCount.current}</div>
|
||||||
)}
|
)}
|
||||||
<h5>
|
<h5>
|
||||||
Function: {name}
|
Function: {name}
|
||||||
|
@ -37,7 +37,7 @@ export const ButtonComponent = React.memo((props: ButtonComponentProps) => {
|
|||||||
return (
|
return (
|
||||||
<div className={'buttonComponent'} id={id}>
|
<div className={'buttonComponent'} id={id}>
|
||||||
{process.env.NODE_ENV === 'development' && (
|
{process.env.NODE_ENV === 'development' && (
|
||||||
<p>Render count: {renderCount.current}</p>
|
<div>Render count: {renderCount.current}</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<DocStringComponent docString={docString} />
|
<DocStringComponent docString={docString} />
|
||||||
@ -49,7 +49,7 @@ export const ButtonComponent = React.memo((props: ButtonComponentProps) => {
|
|||||||
value={parentPath}
|
value={parentPath}
|
||||||
disabled={readOnly}
|
disabled={readOnly}
|
||||||
onChange={(e) => setChecked(e.currentTarget.checked)}>
|
onChange={(e) => setChecked(e.currentTarget.checked)}>
|
||||||
<p>{buttonName}</p>
|
{buttonName}
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -42,7 +42,7 @@ export const ColouredEnumComponent = React.memo((props: ColouredEnumComponentPro
|
|||||||
return (
|
return (
|
||||||
<div className={'enumComponent'} id={id}>
|
<div className={'enumComponent'} id={id}>
|
||||||
{process.env.NODE_ENV === 'development' && (
|
{process.env.NODE_ENV === 'development' && (
|
||||||
<p>Render count: {renderCount.current}</p>
|
<div>Render count: {renderCount.current}</div>
|
||||||
)}
|
)}
|
||||||
<DocStringComponent docString={docString} />
|
<DocStringComponent docString={docString} />
|
||||||
<Row>
|
<Row>
|
||||||
|
@ -68,7 +68,7 @@ export const ConnectionToast = React.memo(
|
|||||||
const { message, bg, delay } = getToastContent();
|
const { message, bg, delay } = getToastContent();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ToastContainer position="bottom-center">
|
<ToastContainer position="bottom-center" className="toastContainer">
|
||||||
<Toast
|
<Toast
|
||||||
show={show}
|
show={show}
|
||||||
onClose={handleClose}
|
onClose={handleClose}
|
||||||
|
@ -39,7 +39,7 @@ export const EnumComponent = React.memo((props: EnumComponentProps) => {
|
|||||||
return (
|
return (
|
||||||
<div className={'enumComponent'} id={parentPath.concat('.' + name)}>
|
<div className={'enumComponent'} id={parentPath.concat('.' + name)}>
|
||||||
{process.env.NODE_ENV === 'development' && (
|
{process.env.NODE_ENV === 'development' && (
|
||||||
<p>Render count: {renderCount.current}</p>
|
<div>Render count: {renderCount.current}</div>
|
||||||
)}
|
)}
|
||||||
<DocStringComponent docString={docString} />
|
<DocStringComponent docString={docString} />
|
||||||
<Row>
|
<Row>
|
||||||
|
@ -31,6 +31,9 @@ export const ImageComponent = React.memo((props: ImageComponentProps) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={'imageComponent'} id={id}>
|
<div className={'imageComponent'} id={id}>
|
||||||
|
{process.env.NODE_ENV === 'development' && (
|
||||||
|
<div>Render count: {renderCount.current}</div>
|
||||||
|
)}
|
||||||
<Card>
|
<Card>
|
||||||
<Card.Header
|
<Card.Header
|
||||||
onClick={() => setOpen(!open)}
|
onClick={() => setOpen(!open)}
|
||||||
|
@ -26,7 +26,7 @@ export const ListComponent = React.memo((props: ListComponentProps) => {
|
|||||||
return (
|
return (
|
||||||
<div className={'listComponent'} id={id}>
|
<div className={'listComponent'} id={id}>
|
||||||
{process.env.NODE_ENV === 'development' && (
|
{process.env.NODE_ENV === 'development' && (
|
||||||
<p>Render count: {renderCount.current}</p>
|
<div>Render count: {renderCount.current}</div>
|
||||||
)}
|
)}
|
||||||
<DocStringComponent docString={docString} />
|
<DocStringComponent docString={docString} />
|
||||||
{value.map((item, index) => {
|
{value.map((item, index) => {
|
||||||
|
@ -76,7 +76,7 @@ export const MethodComponent = React.memo((props: MethodProps) => {
|
|||||||
return (
|
return (
|
||||||
<div className="align-items-center methodComponent" id={id}>
|
<div className="align-items-center methodComponent" id={id}>
|
||||||
{process.env.NODE_ENV === 'development' && (
|
{process.env.NODE_ENV === 'development' && (
|
||||||
<p>Render count: {renderCount.current}</p>
|
<div>Render count: {renderCount.current}</div>
|
||||||
)}
|
)}
|
||||||
<h5 onClick={() => setHideOutput(!hideOutput)} style={{ cursor: 'pointer' }}>
|
<h5 onClick={() => setHideOutput(!hideOutput)} style={{ cursor: 'pointer' }}>
|
||||||
Function: {name}
|
Function: {name}
|
||||||
@ -84,11 +84,9 @@ export const MethodComponent = React.memo((props: MethodProps) => {
|
|||||||
</h5>
|
</h5>
|
||||||
<Form onSubmit={execute}>
|
<Form onSubmit={execute}>
|
||||||
{args}
|
{args}
|
||||||
<div>
|
<Button variant="primary" type="submit">
|
||||||
<Button variant="primary" type="submit">
|
Execute
|
||||||
Execute
|
</Button>
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</Form>
|
</Form>
|
||||||
|
|
||||||
<Collapse in={!hideOutput}>
|
<Collapse in={!hideOutput}>
|
||||||
|
@ -25,10 +25,7 @@ export const Notifications = React.memo((props: NotificationProps) => {
|
|||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ToastContainer
|
<ToastContainer className="navbarOffset toastContainer" position="top-end">
|
||||||
className="navbarOffset toastContainer"
|
|
||||||
position="top-end"
|
|
||||||
style={{ position: 'fixed' }}>
|
|
||||||
{showNotification &&
|
{showNotification &&
|
||||||
notifications.map((notification) => (
|
notifications.map((notification) => (
|
||||||
<Toast
|
<Toast
|
||||||
|
@ -289,8 +289,8 @@ export const NumberComponent = React.memo((props: NumberComponentProps) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="numberComponent" id={id}>
|
<div className="numberComponent" id={id}>
|
||||||
{process.env.NODE_ENV === 'development' && showName && (
|
{process.env.NODE_ENV === 'development' && (
|
||||||
<p>Render count: {renderCount.current}</p>
|
<div>Render count: {renderCount.current}</div>
|
||||||
)}
|
)}
|
||||||
<DocStringComponent docString={docString} />
|
<DocStringComponent docString={docString} />
|
||||||
<div className="d-flex">
|
<div className="d-flex">
|
||||||
|
@ -106,7 +106,7 @@ export const SliderComponent = React.memo((props: SliderComponentProps) => {
|
|||||||
return (
|
return (
|
||||||
<div className="sliderComponent" id={id}>
|
<div className="sliderComponent" id={id}>
|
||||||
{process.env.NODE_ENV === 'development' && (
|
{process.env.NODE_ENV === 'development' && (
|
||||||
<p>Render count: {renderCount.current}</p>
|
<div>Render count: {renderCount.current}</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<DocStringComponent docString={docString} />
|
<DocStringComponent docString={docString} />
|
||||||
|
@ -60,7 +60,7 @@ export const StringComponent = React.memo((props: StringComponentProps) => {
|
|||||||
return (
|
return (
|
||||||
<div className={'stringComponent'} id={id}>
|
<div className={'stringComponent'} id={id}>
|
||||||
{process.env.NODE_ENV === 'development' && (
|
{process.env.NODE_ENV === 'development' && (
|
||||||
<p>Render count: {renderCount.current}</p>
|
<div>Render count: {renderCount.current}</div>
|
||||||
)}
|
)}
|
||||||
<DocStringComponent docString={docString} />
|
<DocStringComponent docString={docString} />
|
||||||
<InputGroup>
|
<InputGroup>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user