add CoreEventTypes with LayoutEvent

Reviewed By: mhollweck

Differential Revision: D6554426

fbshipit-source-id: 856fcb8017682bc203fd69f5f4c93704816046ac
This commit is contained in:
Spencer Ahrens 2017-12-13 11:45:13 -08:00 committed by Facebook Github Bot
parent eaa84997ce
commit 2d4bedba0f
2 changed files with 27 additions and 11 deletions

View File

@ -29,17 +29,7 @@ function debug(...args) {
// console.log.apply(null, arguments);
}
type Layout = {
x: number;
y: number;
width: number;
height: number;
};
type LayoutEvent = {
nativeEvent: {
layout: Layout;
};
};
import type {Layout, LayoutEvent} from 'CoreEventTypes';
type Style = {
margin?: number,
padding?: number,

View File

@ -0,0 +1,26 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModule CoreEventTypes
* @flow
* @format
*/
'use strict';
export type Layout = {
x: number,
y: number,
width: number,
height: number,
};
export type LayoutEvent = {
nativeEvent: {
layout: Layout,
},
};