Add style and userdata to Container

This commit is contained in:
Siklos 2022-07-31 19:24:24 +02:00
parent 90dac41a04
commit 87baffefff
3 changed files with 12 additions and 2 deletions

View file

@ -81,7 +81,11 @@ class App extends React.Component<IAppProps> {
y: 0, y: 0,
width: properties?.Width, width: properties?.Width,
height: this.state.configuration.MainContainer.Height, height: this.state.configuration.MainContainer.Height,
children: [] children: [],
style: properties.Style,
userData: {
type
}
}); });
const newMainContainer = new MainContainer({ const newMainContainer = new MainContainer({

View file

@ -9,6 +9,7 @@ interface IContainerProps {
width: number, width: number,
height: number, height: number,
style?: React.CSSProperties, style?: React.CSSProperties,
userData?: Record<string, string | number | symbol>
} }
export class Container extends React.Component<IContainerProps> { export class Container extends React.Component<IContainerProps> {

View file

@ -16,7 +16,12 @@ serve({
BorderWidth: 48, BorderWidth: 48,
MinWidth: 500, MinWidth: 500,
MaxWidth: 3000, MaxWidth: 3000,
Width: 500 Width: 500,
Style: {
fillOpacity: 0,
borderWidth: 2,
stroke: 'red'
}
} }
], ],
AvailableSymbols: [], AvailableSymbols: [],