How to use the react-native-web.View.propTypes function in react-native-web

To help you get started, we’ve selected a few react-native-web examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Beven91 / react-native-on-web / packages / react-native-on-web / src / Components / TabBarIOS / TabBarContentIOS.js View on Github external
/**
 * 名称:React-Native TabBarIOS Content 组件
 * 日期:2016-11-18
 * 描述:无
 */
import React from 'react';
import PropTypes from 'prop-types';
import { View, StyleSheet } from 'react-native-web';

export default class TabBarContentIOS extends React.Component {
  /**
   * 组件属性定义
   */
  static propTypes = {
    ...View.propTypes,
    selected: PropTypes.bool,
  }

  /**
   * 组件构造函数
   */
  constructor(props) {
    super(props);
  }

  /**
   * 渲染组件
   */
  render() {
    let inStyle = { opacity: (this.props.selected ? 1 : 0) };
    return (
github Beven91 / react-native-on-web / packages / react-native-on-web / src / Components / TabBarIOS / TabBarIOS.js View on Github external
/**
 * 名称:React-Native TabBarIOS for Web
 * 日期:2016-11-17
 * 描述:无
 */
import React from 'react';
import PropTypes from 'prop-types';
import { View, StyleSheet, ColorPropType } from 'react-native-web';
import TabBarItemIOS from './TabBarItemIOS';
import TabBarContentIOS from './TabBarContentIOS';

export default class TabBarIOS extends React.Component {
  static Item = TabBarItemIOS;

  static propTypes = {
    ...View.propTypes,
    /**
     * Color of text on unselected tabs
     */
    unselectedTintColor: ColorPropType,
    /**
     * Color of the currently selected tab icon
     */
    tintColor: ColorPropType,
    /**
     * Background color of the tab bar
     */
    barTintColor: ColorPropType,
    /**
     * A Boolean value that indicates whether the tab bar is translucent
     */
    translucent: PropTypes.bool,
github liivevideo / react-native-web-webrtc / RTCView / index.js View on Github external
const STATUS_LOADING = 'LOADING';
const STATUS_PENDING = 'PENDING';
const STATUS_IDLE = 'IDLE';

const RTCViewSourcePropType = PropTypes.oneOfType([
    PropTypes.shape({
        uri: PropTypes.string.isRequired
    }),
    PropTypes.string
]);

class RTCView extends Component {
    static displayName = 'RTCView'

    static propTypes = {
        ...View.propTypes,
        width: PropTypes.number,
        height: PropTypes.number,
        streamURL: PropTypes.string,
        muted: PropTypes.string,
        autoPlay: PropTypes.string,
        children: PropTypes.any,
        defaultSource: RTCViewSourcePropType,
        onError: PropTypes.func,
        onLayout: PropTypes.func,
        onLoad: PropTypes.func,
        onLoadEnd: PropTypes.func,
        onLoadStart: PropTypes.func,
        source: RTCViewSourcePropType,
    };

    static defaultProps = {};
github Beven91 / react-native-on-web / packages / react-native-on-web / src / Components / TabBarIOS / TabBarItemIOS.js View on Github external
/**
 * 名称:React-Native TabBarItemIOS for Web
 * 日期:2016-11-17
 * 描述:无
 */
import React from 'react';
import LocalPropTypes from '../../PropTypes.js';
import PropTypes from 'prop-types';
import { Image, View, Text, StyleSheet, ColorPropType, TouchableOpacity } from 'react-native-web';

export default class TabBarItemIOS extends React.Component {
  static propTypes = {
    ...View.propTypes,
    /**
     * Little red bubble that sits at the top right of the icon.
     */
    badge: PropTypes.oneOfType([
      PropTypes.string,
      PropTypes.number,
    ]),
    /**
     * Items comes with a few predefined system icons. Note that if you are
     * using them, the title and selectedIcon will be overridden with the
     * system ones.
     */
    systemIcon: PropTypes.oneOf([
      'bookmarks',
      'contacts',
      'downloads',