feat: updating frontend styling

- forms will have red background colour when "instant  update" is enabled
- button styling is in css file now
This commit is contained in:
Mose Müller
2023-08-02 12:06:23 +02:00
parent c1a250e7e6
commit 5400067c18
20 changed files with 38 additions and 31 deletions

View File

@@ -2,6 +2,7 @@ import React, { useEffect, useRef, useState } from 'react';
import { Form, InputGroup } from 'react-bootstrap';
import { emit_update } from '../socket';
import { DocStringComponent } from './DocStringComponent';
import '../App.css';
// TODO: add button functionality
@@ -50,7 +51,7 @@ export const StringComponent = React.memo((props: StringComponentProps) => {
};
return (
<div className={'component boolean'} id={parent_path.concat(name)}>
<div className={'stringComponent'} id={parent_path.concat(name)}>
{process.env.NODE_ENV === 'development' && (
<p>Render count: {renderCount.current}</p>
)}
@@ -67,6 +68,7 @@ export const StringComponent = React.memo((props: StringComponentProps) => {
onChange={handleChange}
onKeyDown={handleKeyDown}
onBlur={handleBlur}
className={isInstantUpdate && !readOnly ? 'instantUpdate' : ''}
/>
</InputGroup>
</div>