Implement minWidth property + refactor default property of new containers and main container (#34)
All checks were successful
continuous-integration/drone/push Build is passing

Co-authored-by: Eric NGUYEN <enguyen@techform.fr>
Reviewed-on: https://git.siklos-chaneru.duckdns.org/Siklos/svg-layout-designer-react/pulls/34
This commit is contained in:
Siklos 2022-08-17 11:14:19 -04:00
parent 60329ef143
commit 2945febd91
12 changed files with 137 additions and 44 deletions

View file

@ -70,12 +70,23 @@ const DynamicForm: React.FunctionComponent<IDynamicFormProps> = (props) => {
value={props.properties.y.toString()}
onChange={(event) => props.onChange('y', Number(event.target.value))}
/>
<InputGroup
labelText='Minimum width'
inputKey='minWidth'
labelClassName=''
inputClassName=''
type='number'
min={1}
value={props.properties.minWidth.toString()}
onChange={(event) => props.onChange('minWidth', Number(event.target.value))}
/>
<InputGroup
labelText='Width'
inputKey='width'
labelClassName=''
inputClassName=''
type='number'
min={props.properties.minWidth}
value={props.properties.width.toString()}
onChange={(event) => props.onChange('width', Number(event.target.value))}
/>
@ -85,6 +96,7 @@ const DynamicForm: React.FunctionComponent<IDynamicFormProps> = (props) => {
labelClassName=''
inputClassName=''
type='number'
min={0}
value={props.properties.height.toString()}
onChange={(event) => props.onChange('height', Number(event.target.value))}
/>