frontend: update style (fix button appearance)

This commit is contained in:
Mose Müller 2023-11-09 17:10:21 +01:00
parent dc1c7e80f4
commit 3cc6399f60
13 changed files with 38 additions and 26 deletions

View File

@ -12,14 +12,28 @@ input.instantUpdate {
}
.navbarOffset {
padding-top: 60px !important;
right: 20;
}
/* .toastContainer {
position: fixed;
} */
.toastContainer {
position: fixed !important;
padding: 5px;
}
.notificationToast {
background-color: rgba(114, 214, 253, 0.5) !important;
}
.exceptionToast {
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;
}

View File

@ -91,7 +91,7 @@ export const AsyncMethodComponent = React.memo((props: AsyncMethodProps) => {
return (
<div className="align-items-center asyncMethodComponent" id={id}>
{process.env.NODE_ENV === 'development' && (
<p>Render count: {renderCount.current}</p>
<div>Render count: {renderCount.current}</div>
)}
<h5>
Function: {name}

View File

@ -37,7 +37,7 @@ export const ButtonComponent = React.memo((props: ButtonComponentProps) => {
return (
<div className={'buttonComponent'} id={id}>
{process.env.NODE_ENV === 'development' && (
<p>Render count: {renderCount.current}</p>
<div>Render count: {renderCount.current}</div>
)}
<DocStringComponent docString={docString} />
@ -49,7 +49,7 @@ export const ButtonComponent = React.memo((props: ButtonComponentProps) => {
value={parentPath}
disabled={readOnly}
onChange={(e) => setChecked(e.currentTarget.checked)}>
<p>{buttonName}</p>
{buttonName}
</ToggleButton>
</div>
);

View File

@ -42,7 +42,7 @@ export const ColouredEnumComponent = React.memo((props: ColouredEnumComponentPro
return (
<div className={'enumComponent'} id={id}>
{process.env.NODE_ENV === 'development' && (
<p>Render count: {renderCount.current}</p>
<div>Render count: {renderCount.current}</div>
)}
<DocStringComponent docString={docString} />
<Row>

View File

@ -68,7 +68,7 @@ export const ConnectionToast = React.memo(
const { message, bg, delay } = getToastContent();
return (
<ToastContainer position="bottom-center">
<ToastContainer position="bottom-center" className="toastContainer">
<Toast
show={show}
onClose={handleClose}

View File

@ -39,7 +39,7 @@ export const EnumComponent = React.memo((props: EnumComponentProps) => {
return (
<div className={'enumComponent'} id={parentPath.concat('.' + name)}>
{process.env.NODE_ENV === 'development' && (
<p>Render count: {renderCount.current}</p>
<div>Render count: {renderCount.current}</div>
)}
<DocStringComponent docString={docString} />
<Row>

View File

@ -31,6 +31,9 @@ export const ImageComponent = React.memo((props: ImageComponentProps) => {
return (
<div className={'imageComponent'} id={id}>
{process.env.NODE_ENV === 'development' && (
<div>Render count: {renderCount.current}</div>
)}
<Card>
<Card.Header
onClick={() => setOpen(!open)}

View File

@ -26,7 +26,7 @@ export const ListComponent = React.memo((props: ListComponentProps) => {
return (
<div className={'listComponent'} id={id}>
{process.env.NODE_ENV === 'development' && (
<p>Render count: {renderCount.current}</p>
<div>Render count: {renderCount.current}</div>
)}
<DocStringComponent docString={docString} />
{value.map((item, index) => {

View File

@ -76,7 +76,7 @@ export const MethodComponent = React.memo((props: MethodProps) => {
return (
<div className="align-items-center methodComponent" id={id}>
{process.env.NODE_ENV === 'development' && (
<p>Render count: {renderCount.current}</p>
<div>Render count: {renderCount.current}</div>
)}
<h5 onClick={() => setHideOutput(!hideOutput)} style={{ cursor: 'pointer' }}>
Function: {name}
@ -84,11 +84,9 @@ export const MethodComponent = React.memo((props: MethodProps) => {
</h5>
<Form onSubmit={execute}>
{args}
<div>
<Button variant="primary" type="submit">
Execute
</Button>
</div>
<Button variant="primary" type="submit">
Execute
</Button>
</Form>
<Collapse in={!hideOutput}>

View File

@ -25,10 +25,7 @@ export const Notifications = React.memo((props: NotificationProps) => {
} = props;
return (
<ToastContainer
className="navbarOffset toastContainer"
position="top-end"
style={{ position: 'fixed' }}>
<ToastContainer className="navbarOffset toastContainer" position="top-end">
{showNotification &&
notifications.map((notification) => (
<Toast

View File

@ -289,8 +289,8 @@ export const NumberComponent = React.memo((props: NumberComponentProps) => {
return (
<div className="numberComponent" id={id}>
{process.env.NODE_ENV === 'development' && showName && (
<p>Render count: {renderCount.current}</p>
{process.env.NODE_ENV === 'development' && (
<div>Render count: {renderCount.current}</div>
)}
<DocStringComponent docString={docString} />
<div className="d-flex">

View File

@ -106,7 +106,7 @@ export const SliderComponent = React.memo((props: SliderComponentProps) => {
return (
<div className="sliderComponent" id={id}>
{process.env.NODE_ENV === 'development' && (
<p>Render count: {renderCount.current}</p>
<div>Render count: {renderCount.current}</div>
)}
<DocStringComponent docString={docString} />

View File

@ -60,7 +60,7 @@ export const StringComponent = React.memo((props: StringComponentProps) => {
return (
<div className={'stringComponent'} id={id}>
{process.env.NODE_ENV === 'development' && (
<p>Render count: {renderCount.current}</p>
<div>Render count: {renderCount.current}</div>
)}
<DocStringComponent docString={docString} />
<InputGroup>