How to use the react-universal.Platform.OS function in react-universal

To help you get started, we’ve selected a few react-universal 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 casesandberg / fold / src / components / compose / Compose.js View on Github external
) : null }
        
          
        

        
          
        
      
    
  )
}

export default Platform.OS === 'web' ? handleHover(Compose) : Compose
github casesandberg / fold / src / components / common / Icon.js View on Github external
'hover': {
      path: {
        fill: '#444',
      },
    },
  }, { hover })

  const icon = icons[name]
  return (
    <svg viewBox="0 0 24 24" style="{">
      <path d="{" style="{"></path>
    </svg>
  )
}

export default Platform.OS === 'web' ? handleHover(Icon) : Icon
github casesandberg / fold / src / components / common / FullFrame.js View on Github external
render() {
    const mappedProps = Platform.OS === 'web' ? {} : {
      onNavigationStateChange: this.mount,
      injectedJavaScript: 'window.location.hash = 1;document.title = document.height;',
    }
    return (
github casesandberg / fold / src / components / Thread.js View on Github external
minWidth: 300,
          flex: 1,
        },
      },
      'web': {
        wrap: {
          maxWidth: '100%',
        },
        header: {
          width: '100%',
        },
        messages: {
          width: '100%',
        },
      },
    }, { web: Platform.OS === 'web' })

    return (
      
        
          
            
              
            
            { thread.id ? (
github casesandberg / fold / src / components / Triage.js View on Github external
render() {
    const { isSidebarVisible } = this.props

    const styles = reactCSS({
      'default': {
        wrap: {
          display: 'flex',
          backgroundColor: '#fafafa',
          paddingTop: Platform.OS === 'web' ? 0 : 22,
          position: 'absolute',
          top: 0,
          bottom: 0,
          left: 0,
          right: 0,
          alignItems: 'stretch',
          flexDirection: 'row',
        },
        sidebar: {
          width: 300,
          minWidth: 300,
          overflow: 'scroll',
          marginRight: 30,
        },
      },
    })

react-universal

A universal React-compatible render engine.

BSD-3-Clause
Latest version published 8 years ago

Package Health Score

53 / 100
Full package analysis

Popular react-universal functions