Function SubAspectComponent

SubAspectComponent is a responsive media sub-component that scales with the viewport and includes optional controls.

import React from 'react';
import { SubAspectComponent } from 'mediasfu-reactjs';

function App() {
return (
<SubAspectComponent
backgroundColor="black"
showControls={true}
containerWidthFraction={0.5}
containerHeightFraction={0.5}
defaultFractionSub={0.4}
>
<div>Content goes here</div>
</SubAspectComponent>
);
}

export default App;

Properties

propTypes?: any

Ignored by React.

Only kept in types for backwards compatibility. Will be removed in a future major release.

displayName?: string

Used in debugging messages. You might want to set it explicitly if you want to display a different name for debugging purposes.


const MyComponent: FC = () => {
return <div>Hello!</div>
}

MyComponent.displayName = 'MyAwesomeComponent'