index.js 1.04 KB
Newer Older
Gaëtan Renaudeau's avatar
Gaëtan Renaudeau committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
import React, {
  Component,
} from "react";
import {
  ScrollView,
  StyleSheet,
  View,
} from "react-native";
import { Blur } from "gl-react-blur";
import { Surface } from "gl-react-native";

const styles = StyleSheet.create({
  container: {
    marginTop: 40,
    flexDirection: "row",
    flexWrap: "wrap",
  }
});

const samples = [1,2,3,4,5,6,7,8];

export default class Orientation extends Component {
  render () {
    return (
<ScrollView>
<View style={styles.container}>
  {samples.map(i =>
    <Surface key={`landscape_${i}`} width={120} height={90}>
      <Blur factor={0.2} passes={2}>
        {`https://raw.githubusercontent.com/recurser/exif-orientation-examples/master/Landscape_${i}.jpg`}
      </Blur>
    </Surface>)}
</View>
<View style={styles.container}>
  {samples.map(i =>
    <Surface key={`portrait_${i}`} width={120} height={160}>
      <Blur factor={0.2} passes={2}>
        {`https://raw.githubusercontent.com/recurser/exif-orientation-examples/master/Portrait_${i}.jpg`}
      </Blur>
    </Surface>)}
</View>
</ScrollView>
    );
  }
}