Skip to content

Commit 459c013

Browse files
committed
chore: update website configuration and example pages
1 parent e6b17fc commit 459c013

File tree

21 files changed

+151
-130
lines changed

21 files changed

+151
-130
lines changed

example/website/next-env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3+
/// <reference types="next/navigation-types/compat/navigation" />
34

45
// NOTE: This file should not be edited
56
// see https://nextjs.org/docs/basic-features/typescript for more information.

example/website/pages/Examples/basic-layouts/left-align.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ import Demo from '@/components/Demo'
4545
<Demo kind="basic-layouts" name="left-align" />
4646

4747
```tsx copy
48+
import { renderItem } from "@/utils/render-item";
4849
import * as React from "react";
4950
import { View } from "react-native";
5051
import Carousel from "react-native-reanimated-carousel";
51-
import { renderItem } from "@/utils/render-item";
5252

5353
const defaultDataWith6Colors = [
5454
"#B0604D",

example/website/pages/Examples/basic-layouts/normal.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ import Demo from '@/components/Demo'
4545
<Demo kind="basic-layouts" name="normal" />
4646

4747
```tsx copy
48+
import { renderItem } from "@/utils/render-item";
4849
import * as React from "react";
4950
import { View } from "react-native";
50-
import Carousel from "react-native-reanimated-carousel";
51-
import { renderItem } from "@/utils/render-item";
5251
import { useSharedValue } from "react-native-reanimated";
52+
import Carousel from "react-native-reanimated-carousel";
5353

5454
const defaultDataWith6Colors = [
5555
"#B0604D",

example/website/pages/Examples/basic-layouts/parallax.mdx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,12 @@ import Demo from '@/components/Demo'
4545
<Demo kind="basic-layouts" name="parallax" />
4646

4747
```tsx copy
48+
import { window } from "@/constants/sizes";
49+
import { renderItem } from "@/utils/render-item";
4850
import * as React from "react";
4951
import { View } from "react-native";
50-
import Carousel from "react-native-reanimated-carousel";
51-
import { renderItem } from "@/utils/render-item";
5252
import { useSharedValue } from "react-native-reanimated";
53+
import Carousel from "react-native-reanimated-carousel";
5354

5455
const defaultDataWith6Colors = [
5556
"#B0604D",
@@ -75,9 +76,9 @@ function Index() {
7576
loop={true}
7677
pagingEnabled={true}
7778
snapEnabled={true}
78-
width={430}
79+
width={window.width}
7980
style={{
80-
width: 430,
81+
width: window.width,
8182
}}
8283
mode="parallax"
8384
modeConfig={{

example/website/pages/Examples/basic-layouts/stack.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ import Demo from '@/components/Demo'
4545
<Demo kind="basic-layouts" name="stack" />
4646

4747
```tsx copy
48+
import { renderItem } from "@/utils/render-item";
4849
import * as React from "react";
4950
import { View } from "react-native";
5051
import type { ICarouselInstance } from "react-native-reanimated-carousel";
5152
import Carousel from "react-native-reanimated-carousel";
52-
import { renderItem } from "@/utils/render-item";
5353

5454
const defaultDataWith6Colors = [
5555
"#B0604D",

example/website/pages/Examples/custom-animations/anim-tab-bar.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,10 @@ import Demo from '@/components/Demo'
4545
<Demo kind="custom-animations" name="anim-tab-bar" />
4646

4747
```tsx copy
48+
import { ElementsText, window } from "@/constants/sizes";
49+
import { useToggleButton } from "@/hooks/useToggleButton";
4850
import * as React from "react";
49-
import { View, Pressable } from "react-native";
51+
import { Pressable, View } from "react-native";
5052
import Animated, {
5153
Extrapolation,
5254
interpolate,
@@ -57,8 +59,6 @@ import Animated, {
5759
} from "react-native-reanimated";
5860
import type { ICarouselInstance } from "react-native-reanimated-carousel";
5961
import Carousel from "react-native-reanimated-carousel";
60-
import { ElementsText, window } from "@/constants/sizes";
61-
import { useToggleButton } from "@/hooks/useToggleButton";
6262

6363
const PAGE_WIDTH = 60;
6464
const PAGE_HEIGHT = 40;

example/website/pages/Examples/custom-animations/blur-parallax.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ import { BlurView as _BlurView } from "expo-blur";
5959
import { parallaxLayout } from "./parallax";
6060

6161
import SButton from "@/components/SButton";
62-
import { ElementsText, window } from "@/constants/sizes";
63-
import { fruitItems } from "@/utils/items";
6462
import { SlideItem } from "@/components/SlideItem";
63+
import { ElementsText, window } from "@/constants/sizes";
6564
import { CaptureWrapper } from "@/store/CaptureProvider";
65+
import { fruitItems } from "@/utils/items";
6666

6767
const BlurView = Animated.createAnimatedComponent(_BlurView);
6868

example/website/pages/Examples/custom-animations/blur-rotate.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ import { parallaxLayout } from "./parallax";
6060

6161
import { SBItem } from "@/components/SBItem";
6262
import SButton from "@/components/SButton";
63-
import { ElementsText, HEADER_HEIGHT, window } from "@/constants/sizes";
64-
import { fruitItems } from "@/utils/items";
65-
import { PURPLE_IMAGES } from "@/constants/purple-images";
6663
import { SlideItem } from "@/components/SlideItem";
64+
import { PURPLE_IMAGES } from "@/constants/purple-images";
65+
import { ElementsText, HEADER_HEIGHT, window } from "@/constants/sizes";
6766
import { CaptureWrapper } from "@/store/CaptureProvider";
67+
import { fruitItems } from "@/utils/items";
6868

6969
const BlurView = Animated.createAnimatedComponent(_BlurView);
7070

example/website/pages/Examples/custom-animations/circular.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ import { TouchableWithoutFeedback } from "react-native-gesture-handler";
5151
import { interpolate } from "react-native-reanimated";
5252
import Carousel, { TAnimationStyle } from "react-native-reanimated-carousel";
5353

54+
import { SlideItem } from "@/components/SlideItem";
5455
import { window } from "@/constants/sizes";
5556
import { getImages } from "@/utils/get-images";
56-
import { SlideItem } from "@/components/SlideItem";
5757

5858
const PAGE_WIDTH = window.width;
5959

example/website/pages/Examples/custom-animations/cube-3d.mdx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,7 @@ function CubeItem() {
112112
Extrapolation.CLAMP,
113113
);
114114

115-
const rotateY = `${interpolate(
116-
value,
117-
[-1, 0, 1],
118-
[-90, 0, 90],
119-
Extrapolation.CLAMP,
120-
)}deg`;
115+
const rotateY = `${interpolate(value, [-1, 0, 1], [-90, 0, 90], Extrapolation.CLAMP)}deg`;
121116

122117
const transform = {
123118
transform: [{ scale }, { translateX }, { perspective }, { rotateY }],

0 commit comments

Comments
 (0)