at-rn-android-kit
Version:
为 React Native 开发 提供的一些Android原生模块/组件 (react native, CoordinatorLayout, AppBarLayout, TabLayout, NestedScrollView, PopupWindow)
37 lines (29 loc) • 943 B
JavaScript
import PropTypes from 'prop-types';
import {View, ViewProperties} from 'react-native';
export interface LayoutParams {
width?: number;
height?: number;
}
export const LayoutParams = {
width: PropTypes.number,
height: PropTypes.number
};
export interface ViewGroupProperties extends ViewProperties {
layoutParams?: LayoutParams;
fitsSystemWindows?: boolean;
}
export const ViewGroupProperties = Object.assign({}, View.propTypes, {
layoutParams: PropTypes.shape(LayoutParams),
fitsSystemWindows: PropTypes.bool
});
export interface AppBarLayoutParams extends LayoutParams {
scrollFlags?: number;
}
export interface AppBarViewProperties extends ViewGroupProperties {
layoutParams?: AppBarLayoutParams;
}
export const AppBarViewProperties = Object.assign({}, ViewGroupProperties, {
layoutParams: PropTypes.shape(Object.assign({}, LayoutParams, {
scrollFlags: PropTypes.number
}))
});