@bluxcc/react 0.1.20 → 0.1.22

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.
@@ -7,5 +7,5 @@ interface HeaderProps {
7
7
  closeButton?: boolean;
8
8
  onClose: () => void;
9
9
  }
10
- declare const ModalHeader: ({ icon, onInfo, onBack, title, closeButton, onClose, }: HeaderProps) => React.JSX.Element;
11
- export default ModalHeader;
10
+ declare const Header: ({ icon, onInfo, onBack, title, closeButton, onClose, }: HeaderProps) => React.JSX.Element;
11
+ export default Header;
@@ -2,13 +2,8 @@ import React from 'react';
2
2
  interface ModalProps {
3
3
  isOpen: boolean;
4
4
  onClose?: () => void;
5
- onBack?: () => void;
6
5
  children: React.ReactNode;
7
- icon?: 'info' | 'back';
8
- onInfo?: () => void;
9
- closeButton?: boolean;
10
- title: string;
11
6
  isSticky?: boolean;
12
7
  }
13
- declare const Modal: ({ isOpen, onClose, onBack, onInfo, children, title, icon, isSticky, closeButton, }: ModalProps) => React.JSX.Element | null;
8
+ declare const Modal: ({ isOpen, onClose, children, isSticky, }: ModalProps) => React.JSX.Element | null;
14
9
  export default Modal;
@@ -0,0 +1,9 @@
1
+ export type LanguageKey = 'en' | 'es';
2
+ export type Translations = {
3
+ [key: string]: {
4
+ [lang in LanguageKey]: string;
5
+ };
6
+ };
7
+ export type TranslationKey = keyof typeof translations;
8
+ declare const translations: Translations;
9
+ export default translations;
@@ -1,9 +1,10 @@
1
- import React from 'react';
2
1
  import { Routes } from '../../types';
2
+ import { LanguageKey } from '../../constants/locales';
3
+ import React from 'react';
3
4
  type RouteContent = {
4
5
  title: string;
5
6
  isSticky?: boolean;
6
7
  Component: React.JSX.Element;
7
8
  };
8
- export declare const modalContent: Record<Routes, RouteContent>;
9
+ export declare const getModalContent: (lang: LanguageKey) => Record<Routes, RouteContent>;
9
10
  export {};
@@ -0,0 +1,4 @@
1
+ export declare const useDynamicHeight: (ref: React.RefObject<HTMLDivElement | null>, deps?: React.DependencyList) => {
2
+ height: string | number;
3
+ ready: boolean;
4
+ };
@@ -0,0 +1 @@
1
+ export declare const useIsMobile: (breakpoint?: number) => boolean;
@@ -0,0 +1,2 @@
1
+ import { TranslationKey } from '../constants/locales';
2
+ export declare const useLang: () => (key: TranslationKey, vars?: Record<string, string>) => string;