mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-28 12:36:41 +07:00
moved components to TypeScript
This commit is contained in:
parent
85b8860862
commit
0a01c91271
54 changed files with 2771 additions and 5134 deletions
|
@ -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());
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue