floatPropertyTabComponent.tsx 760 B

123456789101112131415161718192021
  1. import * as React from "react";
  2. import { GlobalState } from '../../../globalState';
  3. import { FloatLineComponent } from '../../../sharedComponents/floatLineComponent';
  4. import { InputBlock } from 'babylonjs/Materials/Node/Blocks/Input/inputBlock';
  5. interface IFloatPropertyTabComponentProps {
  6. globalState: GlobalState;
  7. inputBlock: InputBlock;
  8. }
  9. export class FloatPropertyTabComponent extends React.Component<IFloatPropertyTabComponentProps> {
  10. render() {
  11. return (
  12. <FloatLineComponent label="Value" target={this.props.inputBlock} propertyName="value" onChange={() => {
  13. this.props.globalState.onUpdateRequiredObservable.notifyObservers();
  14. }}></FloatLineComponent>
  15. );
  16. }
  17. }