react-gm3carousel
Advanced tools
Comparing version 0.0.9 to 0.0.10
@@ -19,5 +19,5 @@ import * as react_jsx_runtime from 'react/jsx-runtime'; | ||
slideWrapperClassName?: string; | ||
gap?: number; | ||
gap?: number | null; | ||
}) => react_jsx_runtime.JSX.Element; | ||
export { GM3Carousel }; |
@@ -85,3 +85,3 @@ "use strict"; | ||
slideWrapperClassName = "gm3c-duration-500", | ||
gap = 16 | ||
gap | ||
}) => { | ||
@@ -97,3 +97,3 @@ const [t, setT] = (0, import_react2.useState)(false), slidesSlice = useLoopData_default( | ||
__spreadProps(__spreadValues({ | ||
style: { gap }, | ||
style: gap ? { gap } : {}, | ||
className: (0, import_tailwind_merge.twMerge)( | ||
@@ -142,2 +142,4 @@ "gm3c-flex gm3c-h-full gm3c-w-full", | ||
})(), style = (() => { | ||
if (!gap) | ||
return; | ||
if (isVertical) { | ||
@@ -144,0 +146,0 @@ if (idx === slidesSlice.length - 1) |
{ | ||
"name": "react-gm3carousel", | ||
"version": "0.0.9", | ||
"version": "0.0.10", | ||
"description": "Google Material 3 Carousel in React", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -86,2 +86,15 @@ # Google Material Design v3 Carousel for React! | ||
You can set a gap either by | ||
``` | ||
gap={16} | ||
``` | ||
or through class names (notice first/last child margins match the gap) | ||
``` | ||
gap-2 [&>*:last-child]:-ml-2 [&>*:first-child]:-mr-2 | ||
``` | ||
## Important | ||
@@ -88,0 +101,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39072
583
108