Merged PR 315: ErgonomieTreeView
Affichage fonctionnelle sous forme de toolbar vertical, comme dans les IDE Related work items: #7976
This commit is contained in:
parent
acb5ba2d82
commit
8a99ef4cfd
13 changed files with 240 additions and 133 deletions
|
@ -4,11 +4,11 @@ import { expect, describe, it, vi } from 'vitest';
|
|||
import { PositionReference } from '../../Enums/PositionReference';
|
||||
import { IContainerProperties } from '../../Interfaces/IContainerProperties';
|
||||
import { Orientation } from '../../Enums/Orientation';
|
||||
import { Properties } from './ContainerProperties';
|
||||
import { ContainerProperties } from './ContainerProperties';
|
||||
|
||||
describe.concurrent('Properties', () => {
|
||||
it('No properties', () => {
|
||||
render(<Properties
|
||||
render(<ContainerProperties
|
||||
properties={undefined}
|
||||
onChange={() => {}}
|
||||
symbols={new Map()}
|
||||
|
@ -67,7 +67,7 @@ describe.concurrent('Properties', () => {
|
|||
(prop as any)[key] = value;
|
||||
});
|
||||
|
||||
const { container, rerender } = render(<Properties
|
||||
const { container, rerender } = render(<ContainerProperties
|
||||
properties={prop}
|
||||
onChange={handleChange}
|
||||
symbols={new Map()}
|
||||
|
@ -108,7 +108,7 @@ describe.concurrent('Properties', () => {
|
|||
expect(prop.parentId).toBe('parentId');
|
||||
expect(prop.x).toBe(2);
|
||||
expect(prop.y).toBe(2);
|
||||
rerender(<Properties
|
||||
rerender(<ContainerProperties
|
||||
properties={Object.assign({}, prop)}
|
||||
onChange={handleChange}
|
||||
symbols={new Map()}
|
||||
|
|
|
@ -10,7 +10,7 @@ interface IPropertiesProps {
|
|||
onChange: (key: string, value: string | number | boolean | number[], type?: PropertyType) => void
|
||||
}
|
||||
|
||||
export function Properties(props: IPropertiesProps): JSX.Element {
|
||||
export function ContainerProperties(props: IPropertiesProps): JSX.Element {
|
||||
if (props.properties === undefined) {
|
||||
return <div></div>;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue