ViewWithSize
Summary: _typescript_ Reviewed By: bnelo12 Differential Revision: D16830537 fbshipit-source-id: 2ca4854a0dd4c092b6e4b09aefeb676f5921fe9e
This commit is contained in:
committed by
Facebook Github Bot
parent
68271e2017
commit
115e2b3576
@@ -8,24 +8,24 @@
|
||||
import {Component} from 'react';
|
||||
|
||||
type ViewWithSizeProps = {
|
||||
onSize: (width: number, height: number) => any,
|
||||
onSize: (width: number, height: number) => any;
|
||||
};
|
||||
|
||||
type ViewWithSizeState = {|
|
||||
width: number,
|
||||
height: number,
|
||||
|};
|
||||
type ViewWithSizeState = {
|
||||
width: number;
|
||||
height: number;
|
||||
};
|
||||
|
||||
export default class ViewWithSize extends Component<
|
||||
ViewWithSizeProps,
|
||||
ViewWithSizeState,
|
||||
ViewWithSizeState
|
||||
> {
|
||||
constructor(props: ViewWithSizeProps, context: Object) {
|
||||
super(props, context);
|
||||
this.state = {height: window.innerHeight, width: window.innerWidth};
|
||||
}
|
||||
|
||||
_onResize: Function;
|
||||
_onResize: (event: UIEvent) => void;
|
||||
|
||||
componentDidMount() {
|
||||
this._onResize = () => {
|
||||
@@ -113,7 +113,7 @@ export {
|
||||
|
||||
// utility elements
|
||||
export {default as View} from './components/View.tsx';
|
||||
export {default as ViewWithSize} from './components/ViewWithSize.js';
|
||||
export {default as ViewWithSize} from './components/ViewWithSize.tsx';
|
||||
export {default as Block} from './components/Block.js';
|
||||
export {default as FocusableBox} from './components/FocusableBox.js';
|
||||
export {default as Sidebar} from './components/Sidebar.tsx';
|
||||
|
||||
Reference in New Issue
Block a user