How to use the react-native-iphone-x-helper.ifIphoneX function in react-native-iphone-x-helper

To help you get started, we’ve selected a few react-native-iphone-x-helper 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 EvanBacon / Instagram / components / ExploreScreenHeader.js View on Github external
render() {
    // const { state = {} } = this.props.navigation;
    // const { data = [someUser, someUser, someUser, someUser] } =
    //   state.params || {};

    const buttonWidth = 36;
    return (
github ztlevi / HotGit / js / pages / SearchPage.js View on Github external
render() {
    let statusBar = null;
    if (Platform.OS === 'ios') {
      statusBar = (
github microsoft / appcenter-sampleapp-react-native / src / components / baseScreen.tsx View on Github external
const bottomButtonView = createButtonView(this.props.options.bottomContainer.bottomButton);
    const topButtonView = createButtonView(this.props.options.bottomContainer.topButton);
    let codePushComponent;
    const self = this;
    if (this.props.options.codepush) {
      codePushComponent = (
         {
            self.codepush = codepush;
          }}
        />
      );
    }

    return (
github renanmav / relay-twitter / src / pages / NewTweet / styles.ts View on Github external
import styled from "styled-components/native";
import { ifIphoneX, getStatusBarHeight } from "react-native-iphone-x-helper";
import { colors } from "../../styles";

export const Container = styled.View`
  margin-top: ${ifIphoneX(getStatusBarHeight(), 0)}px;
`;

export const Buttons = styled.View`
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  margin: 15px;
`;

interface Theme {
  theme: "light" | "dark";
}

export const TweetInput = styled.TextInput`
  margin: 0px 15px;
  font-size: 16px;
github jonsamp / react-native-header-scroll-view / styles.js View on Github external
import { StyleSheet } from 'react-native';
import { ifIphoneX } from 'react-native-iphone-x-helper';

const headerHeight = ifIphoneX(88, 60);

const styles = StyleSheet.create({
  container: { flex: 1, backgroundColor: 'transparent' },
  headerContainer: {
    height: headerHeight,
  },
  headerComponentContainer: {
    height: headerHeight,
    alignItems: 'center',
    justifyContent: 'flex-end',
    paddingBottom: 12,
  },
  headline: {
    fontSize: 17,
    lineHeight: 22,
    fontWeight: '500',
github halilb / react-native-photo-browser / lib / bar / TopBar.js View on Github external
displayed={displayed}
        height={height + ifIphoneX(18, 0)}
      >
        {this.renderBackButton()}
        
      
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    flexDirection: 'row',
    justifyContent: 'center',
    paddingTop: ifIphoneX(48, 30),
  },
  text: {
    fontSize: 18,
    color: 'white',
  },
  backContainer: {
    position: 'absolute',
    flexDirection: 'row',
    left: 0,
    top: 16,
  },
  backText: {
    paddingTop: 14,
    marginLeft: -10,
  },
});
github wix / wix-react-native-storybook-template / storybook-react-native / preview / components / OnDeviceUI / index.js View on Github external
render() {
    const { stories, events, url } = this.props;
    const { isPortrait, isMenuOpen, selectedKind, selectedStory } = this.state;

    const iPhoneXStyles = ifIphoneX(
      isPortrait
        ? {
            marginVertical: 30,
          }
        : {
            marginHorizontal: 30,
          },
      {}
    );

    const menuStyles = [
      style.menuContainer,
      {
        transform: [
          {
            translateX: isMenuOpen ? 0 : -DRAWER_WIDTH - 30,
github halilb / react-native-photo-browser / lib / GridContainer.js View on Github external
initialNumToRender={21}
          numColumns={3}
          renderItem={this.renderItem}
          removeClippedSubviews={false}
          getItemLayout={this.getItemLayout}
        />
      
    );
  }

}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    paddingTop: ifIphoneX(18, 0),
    paddingBottom: Constants.TOOLBAR_HEIGHT,
  },
  row: {
    justifyContent: 'center',
    margin: 1,
    alignItems: 'center',
    borderWidth: 1,
    borderRadius: 1,
  },
});
github karanpratapsingh / Proximity / app / screens / ConversationScreen / index.tsx View on Github external
scrollToBottom
        alwaysShowSend
        inverted={false}
        maxInputLength={200}
        messages={transform}
        scrollToBottomComponent={CustomScrollToBottom}
        textInputProps={{ disable: true }}
        renderComposer={composerProps => }
        renderMessageText={CustomMessageText}
        renderBubble={CustomBubble}
        renderSend={CustomSend}
        renderInputToolbar={CustomInputToolbar}
        onSend={onSend}
        onPressAvatar={navigateToProfile}
        user={{ _id: user.id }}
        bottomOffset={ifIphoneX(20, -12)}
        keyboardShouldPersistTaps={null}
        listViewProps={{ showsVerticalScrollIndicator: false, style: { marginBottom: 16 } }}
      />
    );
  }

  return (
github halilb / react-native-photo-browser / lib / bar / TopBar.js View on Github external
render() {
    const {
      displayed,
      title,
      height,
    } = this.props;

    return (
      
        {this.renderBackButton()}
        
      
    );
  }
}

react-native-iphone-x-helper

A library to help you design your react-native app for the iPhone X

MIT
Latest version published 4 years ago

Package Health Score

53 / 100
Full package analysis