moved components to TypeScript

This commit is contained in:
muerwre 2019-02-12 16:20:31 +07:00
parent 85b8860862
commit 0a01c91271
54 changed files with 2771 additions and 5134 deletions

View file

@ -1,23 +1,23 @@
import React from 'react';
import * as React from 'react';
import { hideRenderer, cropAShot } from '$redux/user/actions';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import Croppr from 'croppr';
import 'croppr/dist/croppr.css';
import { Icon } from '$components/panels/Icon';
import { LOGOS } from '$constants/logos';
import { RendererPanel } from '$components/panels/RendererPanel';
import { IRootState } from "$redux/user/reducer";
type Props = {
data: String,
logo: String,
hideRenderer: Function,
cropAShot: Function,
data: IRootState['renderer']['data'],
logo: IRootState['logo'],
hideRenderer: typeof hideRenderer,
cropAShot: typeof cropAShot,
};
type State = {
opacity: Number,
opacity: number,
};
class Component extends React.Component<Props, State> {
@ -52,7 +52,10 @@ class Component extends React.Component<Props, State> {
regionEl.append(this.logo);
};
croppr;
croppr: Croppr;
logo: HTMLDivElement;
image: HTMLImageElement;
logoImg: HTMLImageElement;
getImage = () => this.props.cropAShot(this.croppr.getValue());