UNPKG

1.17 kBTypeScriptView Raw
1/**
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 *
7 * @format
8 */
9
10import type * as React from 'react';
11import {Constructor} from '../../../types/private/Utilities';
12import {ViewProps} from './ViewPropTypes';
13import {NativeMethods} from '../../../types/public/ReactNativeTypes';
14
15/**
16 * The most fundamental component for building UI, View is a container that supports layout with flexbox, style, some touch handling,
17 * and accessibility controls, and is designed to be nested inside other views and to have 0 to many children of any type.
18 * View maps directly to the native view equivalent on whatever platform React is running on,
19 * whether that is a UIView, <div>, android.view, etc.
20 */
21declare class ViewComponent extends React.Component<ViewProps> {}
22declare const ViewBase: Constructor<NativeMethods> & typeof ViewComponent;
23export class View extends ViewBase {
24 /**
25 * Is 3D Touch / Force Touch available (i.e. will touch events include `force`)
26 * @platform ios
27 */
28 static forceTouchAvailable: boolean;
29}