Skip to content

Commit 2d4bedb

Browse files
sahrensfacebook-github-bot
authored andcommitted
add CoreEventTypes with LayoutEvent
Reviewed By: mhollweck Differential Revision: D6554426 fbshipit-source-id: 856fcb8017682bc203fd69f5f4c93704816046ac
1 parent eaa8499 commit 2d4bedb

File tree

2 files changed

+27
-11
lines changed

2 files changed

+27
-11
lines changed

IntegrationTests/LayoutEventsTest.js

+1-11
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,7 @@ function debug(...args) {
2929
// console.log.apply(null, arguments);
3030
}
3131

32-
type Layout = {
33-
x: number;
34-
y: number;
35-
width: number;
36-
height: number;
37-
};
38-
type LayoutEvent = {
39-
nativeEvent: {
40-
layout: Layout;
41-
};
42-
};
32+
import type {Layout, LayoutEvent} from 'CoreEventTypes';
4333
type Style = {
4434
margin?: number,
4535
padding?: number,

Libraries/Types/CoreEventTypes.js

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/**
2+
* Copyright (c) 2015-present, Facebook, Inc.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the BSD-style license found in the
6+
* LICENSE file in the root directory of this source tree. An additional grant
7+
* of patent rights can be found in the PATENTS file in the same directory.
8+
*
9+
* @providesModule CoreEventTypes
10+
* @flow
11+
* @format
12+
*/
13+
14+
'use strict';
15+
16+
export type Layout = {
17+
x: number,
18+
y: number,
19+
width: number,
20+
height: number,
21+
};
22+
export type LayoutEvent = {
23+
nativeEvent: {
24+
layout: Layout,
25+
},
26+
};

0 commit comments

Comments
 (0)