Skip to content

Commit

Permalink
Merge pull request #21 from vtex-apps/fix/disable-drag
Browse files Browse the repository at this point in the history
Disable drag as default
  • Loading branch information
matheusps committed Apr 12, 2019
2 parents 1e2434e + 9ea141c commit 4206c17
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Expand Up @@ -7,8 +7,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## [0.5.3] - 2019-04-12

### Changed

- Set draggable to false as default.

## [0.5.2] - 2019-04-10

### Fixed

- Condition on `width` of `sliderFrame` when there is less items than the number of itens to show per page.

## [0.5.1] - 2019-04-02
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
@@ -1,7 +1,7 @@
{
"name": "slider",
"vendor": "vtex",
"version": "0.5.2",
"version": "0.5.3",
"title": "VTEX Slider",
"description": "A React Slider component that works well in SPA and SSR",
"mustUpdateAt": "2020-01-30",
Expand Down
2 changes: 1 addition & 1 deletion react/__tests__/__snapshots__/Slider.test.js.snap
Expand Up @@ -13,7 +13,7 @@ exports[`<Slider /> component should match snapshot 1`] = `
>
<ul
class="sliderFrame list pa0 h-100 ma0 flex"
style="width: 400%; transform: translate3d(0, 0, 0); transition: all 0ms ease-out; cursor: -webkit-grab;"
style="width: 400%; transform: translate3d(0, 0, 0); transition: all 0ms ease-out; cursor: default;"
>
<li
class="inline-flex h-100 relative overflow-hidden"
Expand Down
4 changes: 2 additions & 2 deletions react/__tests__/__snapshots__/SliderContainer.test.js.snap
Expand Up @@ -10,7 +10,7 @@ exports[`<SliderContainer /> component should match snapshot 1`] = `
>
<ul
class="sliderFrame list pa0 h-100 ma0 flex"
style="width: 200%; transform: translate3d(0, 0, 0); transition: all 0ms ease-out; cursor: -webkit-grab;"
style="width: 200%; transform: translate3d(0, 0, 0); transition: all 0ms ease-out; cursor: default;"
>
<li
class="inline-flex h-100 relative overflow-hidden"
Expand Down Expand Up @@ -48,7 +48,7 @@ exports[`<SliderContainer /> component should match snapshot with another tag 1`
>
<ul
class="sliderFrame list pa0 h-100 ma0 flex"
style="width: 200%; transform: translate3d(0, 0, 0); transition: all 0ms ease-out; cursor: -webkit-grab;"
style="width: 200%; transform: translate3d(0, 0, 0); transition: all 0ms ease-out; cursor: default;"
>
<li
class="inline-flex h-100 relative overflow-hidden"
Expand Down
6 changes: 3 additions & 3 deletions react/components/Slider.js
Expand Up @@ -72,9 +72,9 @@ class Slider extends PureComponent {
sliderFrame: '',
},
currentSlide: 0,
cursor: '-webkit-grab',
cursorOnMouseDown: '-webkit-grabbing',
draggable: true,
cursor: 'default',
cursorOnMouseDown: 'default',
draggable: false,
duration: 250,
easing: 'ease-out',
loop: false,
Expand Down

0 comments on commit 4206c17

Please sign in to comment.