tw-react-components 0.0.174 → 0.0.175
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.esm.js +9 -1
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -1848,7 +1848,15 @@ const SidebarContextProvider = (_a) => {
|
|
|
1848
1848
|
return isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open);
|
|
1849
1849
|
}, [isMobile, setOpen, setOpenMobile]);
|
|
1850
1850
|
// Add swipe gesture support for opening and closing the sidebar.
|
|
1851
|
-
useOnSwipe(screenRef, (direction) =>
|
|
1851
|
+
useOnSwipe(screenRef, (direction) => {
|
|
1852
|
+
const _setOpen = isMobile ? setOpenMobile : setOpen;
|
|
1853
|
+
if (direction === 'right') {
|
|
1854
|
+
_setOpen(true);
|
|
1855
|
+
}
|
|
1856
|
+
else if (direction === 'left') {
|
|
1857
|
+
_setOpen(false);
|
|
1858
|
+
}
|
|
1859
|
+
});
|
|
1852
1860
|
// Adds a keyboard shortcut to toggle the sidebar.
|
|
1853
1861
|
useEffect(() => {
|
|
1854
1862
|
const handleKeyDown = (event) => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tw-react-components",
|
|
3
3
|
"description": "A set of React components build with TailwindCSS to make a nice dashboard.",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.175",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://bacali95.github.io/tw-react-components",
|
|
7
7
|
"type": "module",
|