Interface MainAspectComponentOptions

Interface defining the props for the MainAspectComponent.

interface MainAspectComponentOptions {
    backgroundColor?: string;
    children: ReactNode;
    showControls?: boolean;
    containerWidthFraction?: number;
    containerHeightFraction?: number;
    defaultFraction?: number;
    updateIsWideScreen: ((isWide: boolean) => void);
    updateIsMediumScreen: ((isMedium: boolean) => void);
    updateIsSmallScreen: ((isSmall: boolean) => void);
}

Properties

backgroundColor?: string

The background color of the component.

'transparent'
children: ReactNode

The child elements to be rendered inside the component.

showControls?: boolean

Flag to determine if controls are shown, affecting the height calculation.

true
containerWidthFraction?: number

Fraction of the window width to be used for the container's width.

1
containerHeightFraction?: number

Fraction of the window height to be used for the container's height.

1
defaultFraction?: number

Default fraction to adjust the height when controls are shown.

0.94
updateIsWideScreen: ((isWide: boolean) => void)

Callback function to update the wide screen state.

updateIsMediumScreen: ((isMedium: boolean) => void)

Callback function to update the medium screen state.

updateIsSmallScreen: ((isSmall: boolean) => void)

Callback function to update the small screen state.