How to use the react-native-ui-lib.Constants.isIOS function in react-native-ui-lib

To help you get started, we’ve selected a few react-native-ui-lib 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 wix / react-native-ui-lib / demo / src / demoApp.js View on Github external
},
      title: {
        color: Colors.white,
        fontSize: Typography.text70.fontSize,
        fontFamily: Constants.isAndroid ? 'sans-serif-bold' : '.SFUIText-Heavy',
        alignment: 'center',
      },
      subtitle: {
        color: Colors.white,
        fontSize: Typography.text80.fontSize,
        fontFamily: Constants.isAndroid ? Typography.text80.fontFamily : '.SFUIText-Medium',
      },
      backButton: {
        // visible: true,
        color: Colors.white,
        showTitle: Constants.isIOS ? false : undefined,
        testID: 'pop',
      },
      leftButtonColor: Colors.white, 
      leftButtonDisabledColor: Colors.rgba(Colors.white, 0.6),
      rightButtonColor: Colors.white, 
      rightButtonDisabledColor: Colors.rgba(Colors.white, 0.6),
    },
  };
}
github rghorbani / react-native-common / src / components / inputs / TextInput.js View on Github external
function createStyles({ rtl, placeholderTextColor, centered }) {
  return StyleSheet.create({
    container: {},
    innerContainer: {
      flexDirection: 'row',
      borderBottomWidth: 1,
      borderColor: Colors.dark70,
      justifyContent: centered ? 'center' : undefined,
      flexGrow: 1,
    },
    innerContainerWithoutUnderline: {
      borderBottomWidth: 0,
    },
    input: {
      flexGrow: 1,
      marginBottom: Constants.isIOS ? 10 : 5,
      padding: 0,
      // textAlign: centered ? 'center' : (rtl ? 'right' : undefined),
      // writingDirection: rtl ? 'rtl' : undefined,
      backgroundColor: 'transparent',
    },
    inputRTL: {
      textAlign: 'right',
      writingDirection: 'rtl',
    },
    inputCentered: {
      textAlign: 'center',
      writingDirection: undefined,
    },
    expandableInput: {
      flexDirection: 'row',
      alignItems: 'center',
github rghorbani / react-native-common / src / components / loading / index.js View on Github external
PropTypes.array,
    ]),
    /**
     * container style
     */
    containerStyle: PropTypes.oneOfType([
      PropTypes.object,
      PropTypes.number,
      PropTypes.array,
    ]),
  };

  static defaultProps = {
    overlay: false,
    loading: true,
    color: Constants.isIOS ? Colors.dark60 : ThemeManager.primaryColor,
    caption: 'Loading...',
  };

  render() {
    const {
      overlay,
      caption,
      captionStyle,
      style,
      containerStyle,
      ...props
    } = this.props;

    if (!this.props.loading) {
      return null;
    }
github wix / react-native-ui-lib / demo / src / screens / nativeComponentScreens / KeyboardTrackingViewScreen.js View on Github external
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: Colors.dark80
  },
  scrollContainer: {
    paddingHorizontal: Spacings.s5
  },
  image: {
    height: 250,
    marginBottom: Spacings.s3
  },
  trackingToolbarContainer: {
    position: Constants.isIOS ? 'absolute' : 'relative',
    bottom: 0,
    width: '100%',
    borderWidth: 1,
    borderColor: Colors.dark60
  },
  inputContainer: {
    paddingHorizontal: Spacings.s5,
    paddingVertical: Spacings.s2,
    backgroundColor: Colors.white
  }
});
github wix / react-native-ui-lib / demo / src / screens / componentScreens / ButtonsScreen.js View on Github external
{...buttonProps}
              onPress={this.changeProps}
              animateLayout
            />
            <button style="{{marginBottom:">

            
            {Constants.isIOS ? (
              </button><button style="{{marginBottom:" label="{'Squarish'}"> (this.button_17 = element)}
                onPress={() =&gt; this.showSnippet(this.button_17)}
              /&gt;
            ) : (
              </button><button style="{{marginBottom:" label="{'Roundish'}"> (this.button_17 = element)}
                onPress={() =&gt; this.showSnippet(this.button_17)}
              /&gt;
            )}</button>
github rghorbani / react-native-common / src / components / header / index.js View on Github external
accessibilityTraits="header"
          style={this.styles.centerItems}
        &gt;
          {content}
        
        
      
    );

    if (Constants.isIOS &amp;&amp; useSafeArea) {
      wrapper = ;
    }
    return wrapper;
  }
}
github wix / react-native-ui-lib / demo / src / screens / componentScreens / TabBarScreen.js View on Github external
import _ from 'lodash';
import React, {Component} from 'react';
import {StyleSheet, ScrollView, Alert} from 'react-native';
import {Constants, Assets, Colors, TabBar, View, Text, Image, Button} from 'react-native-ui-lib'; //eslint-disable-line


const starIcon = require('../../assets/icons/star.png');

const fontWeightBold = Constants.isIOS ? '600' : '700';
const labelsArray = [
  ['ONE TWO', 'THREE', 'THREEEEEEEE', 'FOUR', 'FIVE FIVE', 'SIX', 'SEVEN-ELEVEN'],
  ['ONE TWO', 'THREE', 'THREEEEEEEE', 'FOUR', 'FIVE FIVE', 'SIX', 'SEVEN-ELEVEN'],
  ['SEVEN-ELEVEN', 'ONE TWO', 'THREE', 'THREEEEEEEE', 'FOUR', 'FIVE FIVE', 'SIX'],
  ['SIX', 'ONE TWO', 'THREE', 'THREEEEEEEE', 'FOUR', 'FIVE FIVE', 'SEVEN-ELEVEN'],
  ['FIVE FIVE', 'ONE TWO', 'THREE', 'THREEEEEEEE', 'FOUR', 'SIX', 'SEVEN-ELEVEN'],
];
export default class TabBarScreen extends Component {
  constructor(props) {
    super(props);

    this.state = {
      selectedIndex: 0,
      selectedIndex1: 1,
      selectedIndex2: 2,
      selectedIndex3: 3,