Skip to content

Commit

Permalink
add CoreEventTypes with LayoutEvent
Browse files Browse the repository at this point in the history
Reviewed By: mhollweck

Differential Revision: D6554426

fbshipit-source-id: 856fcb8017682bc203fd69f5f4c93704816046ac
  • Loading branch information
sahrens authored and facebook-github-bot committed Dec 13, 2017
1 parent eaa8499 commit 2d4bedb
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 11 deletions.
12 changes: 1 addition & 11 deletions IntegrationTests/LayoutEventsTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
26 changes: 26 additions & 0 deletions Libraries/Types/CoreEventTypes.js
Original file line number Diff line number Diff line change
@@ -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,
},
};

0 comments on commit 2d4bedb

Please sign in to comment.