Merged PR 163: Remove the static form + rename some components for clarity
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
The static form is hard to maintain so I am removing it + rename some components for clarity + moved some utils files
This commit is contained in:
parent
7e3ccdee99
commit
66ea3b1b64
21 changed files with 150 additions and 523 deletions
|
@ -1,17 +0,0 @@
|
|||
import * as React from 'react';
|
||||
import { ISymbolModel } from '../../Interfaces/ISymbolModel';
|
||||
import DynamicForm from './DynamicForm';
|
||||
|
||||
interface IFormProps {
|
||||
symbol: ISymbolModel
|
||||
symbols: Map<string, ISymbolModel>
|
||||
onChange: (key: string, value: string | number | boolean, isStyle?: boolean) => void
|
||||
}
|
||||
|
||||
export const Form: React.FunctionComponent<IFormProps> = (props) => {
|
||||
return <DynamicForm
|
||||
symbol={props.symbol}
|
||||
symbols={props.symbols}
|
||||
onChange={props.onChange}
|
||||
/>;
|
||||
};
|
|
@ -3,12 +3,12 @@ import { ISymbolModel } from '../../Interfaces/ISymbolModel';
|
|||
import { restoreX, transformX } from '../../utils/svg';
|
||||
import { InputGroup } from '../InputGroup/InputGroup';
|
||||
|
||||
interface IDynamicFormProps {
|
||||
interface ISymbolFormProps {
|
||||
symbol: ISymbolModel
|
||||
symbols: Map<string, ISymbolModel>
|
||||
onChange: (key: string, value: string | number | boolean) => void
|
||||
}
|
||||
const DynamicForm: React.FunctionComponent<IDynamicFormProps> = (props) => {
|
||||
const SymbolForm: React.FunctionComponent<ISymbolFormProps> = (props) => {
|
||||
return (
|
||||
<div className='grid grid-cols-2 gap-y-4'>
|
||||
<InputGroup
|
||||
|
@ -53,4 +53,4 @@ const DynamicForm: React.FunctionComponent<IDynamicFormProps> = (props) => {
|
|||
);
|
||||
};
|
||||
|
||||
export default DynamicForm;
|
||||
export default SymbolForm;
|
|
@ -1,8 +1,6 @@
|
|||
import React, { useState } from 'react';
|
||||
import IContainerProperties from '../../Interfaces/IContainerProperties';
|
||||
import React from 'react';
|
||||
import { ISymbolModel } from '../../Interfaces/ISymbolModel';
|
||||
import { ToggleButton } from '../ToggleButton/ToggleButton';
|
||||
import { Form } from './Form';
|
||||
import SymbolForm from './SymbolForm';
|
||||
|
||||
interface ISymbolPropertiesProps {
|
||||
symbol?: ISymbolModel
|
||||
|
@ -17,7 +15,7 @@ export const SymbolProperties: React.FC<ISymbolPropertiesProps> = (props: ISymbo
|
|||
|
||||
return (
|
||||
<div className='h-3/5 p-3 bg-slate-200 overflow-y-auto'>
|
||||
<Form
|
||||
<SymbolForm
|
||||
symbol={props.symbol}
|
||||
symbols={props.symbols}
|
||||
onChange={props.onChange}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue