yet-another-react-lightbox
Advanced tools
Comparing version 1.11.1 to 1.12.0
import * as React from "react"; | ||
import { cssClass, cssVar, isDefined, makeUseContext } from "../core/utils.js"; | ||
import { clsx, cssClass, cssVar, isDefined, makeUseContext } from "../core/utils.js"; | ||
import { useEvents } from "../core/contexts/Events.js"; | ||
@@ -7,3 +7,3 @@ import { createModule } from "../core/index.js"; | ||
const defaultMaxLines = 3; | ||
const cls = (className) => cssClass(`slide_${className}`); | ||
const cssPrefix = (className) => cssClass(`slide_${className}`); | ||
const hasTitle = (slide) => "title" in slide ? typeof slide.title === "string" : false; | ||
@@ -15,7 +15,7 @@ const hasDescription = (slide) => "description" in slide ? typeof slide.description === "string" : false; | ||
const { toolbarWidth } = useCaptions(); | ||
return (React.createElement("div", { className: cls(`title_container`) }, | ||
React.createElement("div", { className: cls("title"), ...(toolbarWidth ? { style: { [cssVar("toolbar_width")]: `${toolbarWidth}px` } } : null) }, title))); | ||
return (React.createElement("div", { className: clsx(cssPrefix("captions_container"), cssPrefix("title_container")) }, | ||
React.createElement("div", { className: cssPrefix("title"), ...(toolbarWidth ? { style: { [cssVar("toolbar_width")]: `${toolbarWidth}px` } } : null) }, title))); | ||
}; | ||
const Description = ({ description, align, maxLines }) => (React.createElement("div", { className: cls("description_container") }, | ||
React.createElement("div", { className: cls("description"), ...(align !== defaultTextAlign || maxLines !== defaultMaxLines | ||
const Description = ({ description, align, maxLines }) => (React.createElement("div", { className: clsx(cssPrefix("captions_container"), cssPrefix("description_container")) }, | ||
React.createElement("div", { className: cssPrefix("description"), ...(align !== defaultTextAlign || maxLines !== defaultMaxLines | ||
? { | ||
@@ -22,0 +22,0 @@ style: { |
{ | ||
"name": "yet-another-react-lightbox", | ||
"version": "1.11.1", | ||
"version": "1.12.0", | ||
"description": "Modern React lightbox component", | ||
@@ -5,0 +5,0 @@ "author": "Igor Danchenko", |
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
158651
105176
3258
132
0
1
0