Skip to content
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

feat: add triggerClickOn prop #70

Merged
merged 1 commit into from
Mar 22, 2022
Merged

feat: add triggerClickOn prop #70

merged 1 commit into from
Mar 22, 2022

Conversation

hasangenc0
Copy link
Contributor

Description

Adds triggerClickOn prop.

Triggers onClick handlers of carousel items if swipe amount smaller than triggerClickOn.

Additional context

Usage

<Carousel triggerClickOn={5} />

if triggerClickOn is 5, when a user swipes lower than 5px then pointer events of carousel item will be triggered.


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.
    diff --git a/.github/workflows/PULL_REQUEST_TEMPLATE.md b/.github/workflows/PULL_REQUEST_TEMPLATE.md

@hasangenc0 hasangenc0 added the enhancement New feature or request label Mar 22, 2022
@codecov
Copy link

codecov bot commented Mar 22, 2022

Codecov Report

Merging #70 (c1e5cfc) into master (fef86c9) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master      #70   +/-   ##
=======================================
  Coverage   87.16%   87.16%           
=======================================
  Files          10       10           
  Lines         405      405           
  Branches      105      105           
=======================================
  Hits          353      353           
  Misses         52       52           
Flag Coverage Δ
unittests 87.16% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/components/carousel/defaultProps.ts 100.00% <ø> (ø)
src/components/carousel/index.tsx 95.90% <ø> (ø)
src/components/item/index.tsx 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fef86c9...c1e5cfc. Read the comment docs.

@hasangenc0 hasangenc0 merged commit 684bd77 into master Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant