graphActionsBar.tsx 1001 B

1234567891011121314151617181920212223242526272829
  1. import * as React from "react";
  2. import { ButtonLineComponent } from '../../../lines/buttonLineComponent';
  3. interface IGraphActionsBarProps {
  4. addKeyframe: () => void;
  5. handleValueChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
  6. flatTangent: () => void;
  7. currentValue: number;
  8. }
  9. export class GraphActionsBar extends React.Component<IGraphActionsBarProps>{
  10. constructor(props: IGraphActionsBarProps) {
  11. super(props);
  12. }
  13. render() {
  14. return (
  15. <div className="actions-wrapper">
  16. <div className="action-input">
  17. <label>Value</label>
  18. <input type="number" value={this.props.currentValue} onChange={this.props.handleValueChange}/>
  19. </div>
  20. <ButtonLineComponent label={"Add Keyframe"} onClick={this.props.addKeyframe} />
  21. <ButtonLineComponent label={"Flat Tangent"} onClick={this.props.flatTangent} />
  22. </div>
  23. )
  24. }
  25. }