Skip to content

Updating Simple Pattern Documentation#354

Merged
sblinde merged 4 commits intomainfrom
docs-simple-pattern
Oct 16, 2024
Merged

Updating Simple Pattern Documentation#354
sblinde merged 4 commits intomainfrom
docs-simple-pattern

Conversation

@sblinde
Copy link
Contributor

@sblinde sblinde commented Oct 15, 2024

Description

This PR updates the documentation for the Simple Pattern, giving a more contextual update to the Simple Carousel documentation.

Type of Change

  • This change requires a documentation update

@changeset-bot
Copy link

changeset-bot bot commented Oct 15, 2024

⚠️ No Changeset found

Latest commit: c7f6ff6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Oct 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-swipeable ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 15, 2024 9:07pm

@github-actions
Copy link
Contributor

github-actions bot commented Oct 15, 2024

size-limit report 📦

Path Size
lib/index.js 1.63 KB (0%)
dist/react-swipeable.js 1.72 KB (0%)
es/index.js 1.72 KB (0%)

@sblinde
Copy link
Contributor Author

sblinde commented Oct 15, 2024

@sblinde
Copy link
Contributor Author

sblinde commented Oct 15, 2024

This is ready for review as well for the React Swipeable Simple Pattern Documentation. Thank you both!

@hartzis && @carbonrobot

URL to Preview: https://react-swipeable-git-docs-simple-pattern-formidable-labs.vercel.app/open-source/react-swipeable/docs/examples/simple-pattern

@sblinde sblinde requested a review from hartzis October 15, 2024 21:10
Then, building upon the reducer logic, the `<Carousel>` is constructed. We hold the number of items within a count of `numItems`. We utilize the reducer within the `React.useReducer` hook.

By creating `slide`, as a `const`, we can utilize that later in the component, calling it within `useSwipeable`: called upon `slide(NEXT)` and `slide(PREV)`, invoking the `dispatch` and the `timeout` we built within `slide`. Within the use of `useSwippeable`, we set `swipeDuration` to `500ms`. We set `preventScrollOnSwipe` to `true`, and `trackMouse` to `true`.
By creating `slide`, as a `const`, we can utilize that later in the component, calling it within `useSwipeable`: called upon `slide(NEXT)` and `slide(PREV)`, invoking the `dispatch` and the `timeout` we built within `slide`. Within the use of `useSwipeable`, we set `swipeDuration` to `500ms`. We set `preventScrollOnSwipe` to `true`, and `trackMouse` to `true`.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just realized I had a typo in what was merged previously, fixing it here.

@sblinde sblinde merged commit 527a3be into main Oct 16, 2024
@sblinde sblinde deleted the docs-simple-pattern branch October 16, 2024 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants