@homecode/ui 4.18.7 → 4.18.8

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.
@@ -6,7 +6,7 @@ import { Button } from '../Button/Button.js';
6
6
  import { Icon } from '../Icon/Icon.js';
7
7
  import S from './LightBox.styl.js';
8
8
 
9
- function LightBox({ children, onClose, blur, ...props }) {
9
+ function LightBox({ children, className, onClose, blur, ...props }) {
10
10
  const [isOpen, setOpen] = useState(false);
11
11
  const onKeyDown = useCallback(e => {
12
12
  if (isOpen && e.key === 'Escape') {
@@ -22,7 +22,7 @@ function LightBox({ children, onClose, blur, ...props }) {
22
22
  document.addEventListener('keydown', onKeyDown, true);
23
23
  return () => document.removeEventListener('keydown', onKeyDown, true);
24
24
  }, [isOpen]);
25
- return (jsxs(Paranja, { className: cn(S.root, isOpen && S.open), blur: blur, children: [children, jsx(Button, { className: S.close, onClick: onClose, variant: "clear", children: jsx(Icon, { type: "close", size: "l" }) })] }));
25
+ return (jsxs(Paranja, { className: cn(S.root, isOpen && S.open, className), blur: blur, children: [children, jsx(Button, { className: S.close, onClick: onClose, variant: "clear", children: jsx(Icon, { type: "close", size: "l" }) })] }));
26
26
  }
27
27
 
28
28
  export { LightBox };
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
2
  import * as T from './LightBox.types';
3
- export declare function LightBox({ children, onClose, blur, ...props }: T.Props): JSX.Element;
3
+ export declare function LightBox({ children, className, onClose, blur, ...props }: T.Props): JSX.Element;
@@ -1,5 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  export type Props = {
3
+ className?: string;
3
4
  isOpen?: boolean;
4
5
  onClose?: () => void;
5
6
  children: ReactNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homecode/ui",
3
- "version": "4.18.7",
3
+ "version": "4.18.8",
4
4
  "description": "React UI components library",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",