-
Notifications
You must be signed in to change notification settings - Fork 709
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/vertical image transition (#748)
* Add vertical scrolling for image gallery * Add veritical scroll prop and add base vertical scroll functionality * Create svgs for top and bottom icons * Create top and bottom nav components * Render top and bottom arrows * Add styling to top and bottom arrows * Add initial logic for vetical swipe direction * Add logic for vertical flicking - Prevent touch screen devices from scrolling when transitioning slides on vertical scroll mode - Ensure slides transition only for correct swipe directions * Update example app to incorporate vertical sliding * Remove unnecessary console log * Resolve merge conflicts * Change .js files to .jsx components * Update import paths
- Loading branch information
1 parent
e456451
commit 5067a49
Showing
7 changed files
with
207 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,4 +44,4 @@ | |
} | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import React from "react"; | ||
import { bool, func } from "prop-types"; | ||
import SVG from "src/components/SVG"; | ||
|
||
const BottomNav = React.memo(({ disabled, onClick }) => { | ||
return ( | ||
<button | ||
type="button" | ||
className="image-gallery-icon image-gallery-bottom-nav" | ||
disabled={disabled} | ||
onClick={onClick} | ||
aria-label="Next Slide" | ||
> | ||
<SVG icon="bottom" viewBox="6 0 12 24" /> | ||
</button> | ||
); | ||
}); | ||
|
||
BottomNav.displayName = "BottomNav"; | ||
|
||
BottomNav.propTypes = { | ||
disabled: bool.isRequired, | ||
onClick: func.isRequired, | ||
}; | ||
|
||
export default BottomNav; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import React from "react"; | ||
import { bool, func } from "prop-types"; | ||
import SVG from "src/components/SVG"; | ||
|
||
const TopNav = React.memo(({ disabled, onClick }) => { | ||
return ( | ||
<button | ||
type="button" | ||
className="image-gallery-icon image-gallery-top-nav" | ||
disabled={disabled} | ||
onClick={onClick} | ||
aria-label="Previous Slide" | ||
> | ||
<SVG icon="top" viewBox="6 0 12 24" /> | ||
</button> | ||
); | ||
}); | ||
|
||
TopNav.displayName = "TopNav"; | ||
|
||
TopNav.propTypes = { | ||
disabled: bool.isRequired, | ||
onClick: func.isRequired, | ||
}; | ||
|
||
export default TopNav; |
Oops, something went wrong.