-
-
Notifications
You must be signed in to change notification settings - Fork 1k
@relextm19/docs examples #4090
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@relextm19/docs examples #4090
Changes from all commits
5736594
f201788
8598093
6e2f843
3eb98c2
4ef9b94
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| module.exports = { | ||
| presets: [require.resolve('@docusaurus/core/lib/babel/preset')], | ||
| plugins: ['react-native-reanimated/plugin'], | ||
| plugins: ['react-native-worklets/plugin'], | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,19 +5,12 @@ sidebar_label: Rotation gesture | |
| sidebar_position: 4 | ||
| --- | ||
|
|
||
| import { vanishOnMobile, appearOnMobile, webContainer } from '@site/src/utils/getGestureStyles'; | ||
|
|
||
| import useBaseUrl from '@docusaurus/useBaseUrl'; | ||
| import { webContainer } from '@site/src/utils/getGestureStyles'; | ||
|
|
||
| import RotationGestureBasic from '@site/static/examples/RotationGestureBasic'; | ||
| import RotationGestureBasicSrc from '!!raw-loader!@site/static/examples/RotationGestureBasicSrc'; | ||
| import RotationGestureBasicSrc from '!!raw-loader!@site/static/examples/RotationGestureBasic'; | ||
|
|
||
|
Comment on lines
10
to
12
|
||
| <div className={webContainer}> | ||
| <div className={vanishOnMobile} style={{ display: 'flex', justifyContent: 'center', maxWidth: 360 }}> | ||
| <video playsInline autoPlay muted loop style={{maxWidth: 360}}> | ||
| <source src={useBaseUrl("/video/rotation.mp4")} type="video/mp4"/> | ||
| </video> | ||
| </div> | ||
| <InteractiveExample | ||
| component={<RotationGestureBasic/>} | ||
| src={RotationGestureBasicSrc} | ||
|
|
@@ -42,12 +35,6 @@ The gesture activates when fingers are placed on the screen and rotate around a | |
| When implementing rotation based on `anchor` point, make sure to use it after the gesture had activated, i.e. in `onActivate` or `onUpdate` callbacks. Using it in `onBegin` may lead to unexpected behavior. | ||
| ::: | ||
|
|
||
| <div className={appearOnMobile} style={{ display: 'flex', justifyContent: 'center' }}> | ||
| <video playsInline autoPlay muted loop style={{maxWidth: 360}}> | ||
| <source src={useBaseUrl("/video/rotation.mp4")} type="video/mp4"/> | ||
| </video> | ||
| </div> | ||
|
|
||
| ## Example | ||
|
|
||
| <CollapsibleCode | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,7 +10,7 @@ import { vanishOnMobile, appearOnMobile, webContainer } from '@site/src/utils/ge | |
| import useBaseUrl from '@docusaurus/useBaseUrl'; | ||
|
|
||
| import FlingGestureBasic from '@site/static/examples/FlingGestureBasic'; | ||
| import FlingGestureBasicSrc from '!!raw-loader!@site/static/examples/FlingGestureBasicSrc'; | ||
| import FlingGestureBasicSrc from '!!raw-loader!@site/static/examples/FlingGestureBasic'; | ||
|
|
||
|
Comment on lines
12
to
14
|
||
| import OldAPIInfo from './\_shared/v2-info.md' | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,7 @@ import { vanishOnMobile, appearOnMobile, webContainer } from '@site/src/utils/ge | |
| import useBaseUrl from '@docusaurus/useBaseUrl'; | ||
|
|
||
| import PanGestureBasic from '@site/static/examples/PanGestureBasic'; | ||
| import PanGestureBasicSrc from '!!raw-loader!@site/static/examples/PanGestureBasicSrc'; | ||
| import PanGestureBasicSrc from '!!raw-loader!@site/static/examples/PanGestureBasic'; | ||
|
|
||
|
Comment on lines
16
to
18
|
||
| <div className={webContainer}> | ||
| <div className={vanishOnMobile} style={{ display: 'flex', justifyContent: 'center', maxWidth: 360 }}> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,7 @@ import { vanishOnMobile, appearOnMobile, webContainer } from '@site/src/utils/ge | |
| import useBaseUrl from '@docusaurus/useBaseUrl'; | ||
|
|
||
| import PinchGestureBasic from '@site/static/examples/PinchGestureBasic'; | ||
| import PinchGestureBasicSrc from '!!raw-loader!@site/static/examples/PinchGestureBasicSrc'; | ||
| import PinchGestureBasicSrc from '!!raw-loader!@site/static/examples/PinchGestureBasic'; | ||
|
|
||
|
Comment on lines
16
to
18
|
||
| <div className={webContainer}> | ||
| <div className={vanishOnMobile} style={{ display: 'flex', justifyContent: 'center', maxWidth: 360 }}> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,7 @@ import { vanishOnMobile, appearOnMobile, webContainer } from '@site/src/utils/ge | |
| import useBaseUrl from '@docusaurus/useBaseUrl'; | ||
|
|
||
| import RotationGestureBasic from '@site/static/examples/RotationGestureBasic'; | ||
| import RotationGestureBasicSrc from '!!raw-loader!@site/static/examples/RotationGestureBasicSrc'; | ||
| import RotationGestureBasicSrc from '!!raw-loader!@site/static/examples/RotationGestureBasic'; | ||
|
|
||
|
Comment on lines
16
to
18
|
||
| <div className={webContainer}> | ||
| <div className={vanishOnMobile} style={{ display: 'flex', justifyContent: 'center', maxWidth: 360 }}> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This page documents
usePinchGesture, but the raw-loaderPinchGestureBasicSrcimport now points atstatic/examples/PinchGestureBasic, whose implementation currently uses a pan gesture. Update the imported example (or the example implementation) so the displayed code and interactive demo actually useusePinchGesture.