-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathExample.js
More file actions
30 lines (27 loc) · 718 Bytes
/
Example.js
File metadata and controls
30 lines (27 loc) · 718 Bytes
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
import React from "react";
import { View } from "react-native";
import CircularCarousel from "./CircularCarousel";
export default class App extends React.Component {
render() {
const dataSource = [
{ url: "", color: "#FE0404" },
{ url: "", color: "#522A73" },
{ url: "", color: "#008200" },
{ url: "", color: "#034223" },
{ url: "", color: "#015280" }
];
return (
<View style={{ flex: 1, justifyContent: "center", alignItems: "center" }}>
<CircularCarousel
dataSource={dataSource}
onItemPress={(item) => {
console.log(item);
}}
containerDim={{ height: 200, width: 350 }}
itemDim={{ width: 110, height: 120 }}
radius={100}
/>
</View>
);
}
}