yet-another-react-lightbox 3.20.2 → 3.21.1
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/dist/index.d.ts +1 -1
- package/dist/index.js +2 -1
- package/dist/plugins/thumbnails/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -161,7 +161,7 @@ declare const TimeoutsContext: React.Context<TimeoutsContextType | null>;
|
|
|
161
161
|
declare const useTimeouts: () => TimeoutsContextType;
|
|
162
162
|
declare function TimeoutsProvider({ children }: React.PropsWithChildren): React.JSX.Element;
|
|
163
163
|
|
|
164
|
-
type IconButtonProps =
|
|
164
|
+
type IconButtonProps = React.ComponentProps<"button"> & {
|
|
165
165
|
label: string;
|
|
166
166
|
icon: React.ElementType;
|
|
167
167
|
renderIcon?: () => React.ReactNode;
|
package/dist/index.js
CHANGED
|
@@ -382,7 +382,8 @@ function TimeoutsProvider({ children }) {
|
|
|
382
382
|
|
|
383
383
|
const IconButton = React.forwardRef(function IconButton({ label: label$1, className, icon: Icon, renderIcon, onClick, style, ...rest }, ref) {
|
|
384
384
|
const { styles, labels } = useLightboxProps();
|
|
385
|
-
|
|
385
|
+
const buttonLabel = label(labels, label$1);
|
|
386
|
+
return (React.createElement("button", { ref: ref, type: "button", title: buttonLabel, "aria-label": buttonLabel, className: clsx(cssClass(ELEMENT_BUTTON), className), onClick: onClick, style: { ...style, ...styles.button }, ...rest }, renderIcon ? renderIcon() : React.createElement(Icon, { className: cssClass(ELEMENT_ICON), style: styles.icon })));
|
|
386
387
|
});
|
|
387
388
|
|
|
388
389
|
function svgIcon(name, children) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { PluginProps, PLUGIN_THUMBNAILS, Callback, RenderFunction } from '../../types.js';
|
|
2
|
+
import { PluginProps, PLUGIN_THUMBNAILS, Callback, ContainerRect, ImageFit, RenderFunction, Slide } from '../../types.js';
|
|
3
3
|
|
|
4
4
|
/** Thumbnails plugin */
|
|
5
5
|
declare function Thumbnails({ augment, contains, append, addParent }: PluginProps): void;
|