Skip to content

Commit

Permalink
docs(fix): fixes a dead link in snapback zoom docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Glazzes committed Feb 28, 2024
1 parent 213d156 commit 9c43247
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ npm-debug.log
yarn-debug.log
yarn-error.log

# docs
docs/docs/.vitepress/cache
docs/docs/.vitepress/dist

# BUCK
buck-out/
\.buckd/
Expand Down
3 changes: 0 additions & 3 deletions docs/.gitignore

This file was deleted.

15 changes: 14 additions & 1 deletion docs/docs/components/snapbackzoom.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Increase the gesture detection area around your component in all directions by a
Custom [React Native Reanimated](https://docs.swmansion.com/react-native-reanimated/)'s timing configuration used to snap back to the original position

### resizeConfig
- Type: [ResizeConfig]()
- Type: [ResizeConfig](#resizeconfig-type)
- Default: `undefined`

Dynamically recalculates `SnapBackZoom` component's `width` and `height` style properties to align with a given `aspect ratio` based on a `scale` value as the gesture scale increases, see [notes](#notes)
Expand Down Expand Up @@ -145,3 +145,16 @@ Imagine you've got a lot of images you want to display as tiles of 200x200 pixel
:::

At a scale of one your image is a tile of 200x200 pixel size, in other words a square, but at a scale two it resizes to 340x200 pixel size becoming a rectangle matching with the image's aspect ratio.

## Type Definitions
### ResizeConfig Type
```jsx
type ResizeConfig = {
size: {
width: number;
height: number;
},
aspectRatio: number;
scale: number;
}
```
4 changes: 0 additions & 4 deletions docs/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ hero:
text: Get Started
link: ./get-started

- theme: alt
text: API Examples
link: /api-examples

features:
- title: Feature A
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
Expand Down

0 comments on commit 9c43247

Please sign in to comment.