@0xsquid/ui 0.8.3 → 0.9.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.
Files changed (52) hide show
  1. package/README.md +22 -0
  2. package/dist/cjs/index.js +116 -75
  3. package/dist/cjs/types/components/badges/index.d.ts +1 -0
  4. package/dist/cjs/types/components/controls/Input.d.ts +2 -2
  5. package/dist/cjs/types/components/controls/Tooltip.d.ts +1 -2
  6. package/dist/cjs/types/components/icons/Clock.d.ts +4 -0
  7. package/dist/cjs/types/components/layout/DropdownMenu.d.ts +4 -1
  8. package/dist/cjs/types/components/layout/InfoBox.d.ts +8 -0
  9. package/dist/cjs/types/components/layout/Menu.d.ts +2 -1
  10. package/dist/cjs/types/components/layout/Modal.d.ts +2 -1
  11. package/dist/cjs/types/components/layout/ModalContent.d.ts +8 -0
  12. package/dist/cjs/types/components/layout/NavigationBar.d.ts +7 -4
  13. package/dist/cjs/types/components/layout/index.d.ts +1 -0
  14. package/dist/cjs/types/components/lists/DropdownMenuItem.d.ts +2 -1
  15. package/dist/cjs/types/components/lists/HistoryItem.d.ts +3 -1
  16. package/dist/cjs/types/components/lists/SettingsItem.d.ts +4 -1
  17. package/dist/cjs/types/hooks/index.d.ts +1 -1
  18. package/dist/cjs/types/hooks/useDropdownMenu.d.ts +10 -0
  19. package/dist/cjs/types/stories/buttons/AssetsButton.stories.d.ts +2 -1
  20. package/dist/cjs/types/stories/layout/InfoBox.stories.d.ts +7 -0
  21. package/dist/cjs/types/stories/layout/ModalContent.stories.d.ts +8 -0
  22. package/dist/cjs/types/stories/layout/NavigationBar.stories.d.ts +1 -0
  23. package/dist/cjs/types/stories/lists/HistoryItem.stories.d.ts +1 -0
  24. package/dist/cjs/types/stories/lists/SettingsItem.stories.d.ts +2 -0
  25. package/dist/esm/index.js +114 -75
  26. package/dist/esm/types/components/badges/index.d.ts +1 -0
  27. package/dist/esm/types/components/controls/Input.d.ts +2 -2
  28. package/dist/esm/types/components/controls/Tooltip.d.ts +1 -2
  29. package/dist/esm/types/components/icons/Clock.d.ts +4 -0
  30. package/dist/esm/types/components/layout/DropdownMenu.d.ts +4 -1
  31. package/dist/esm/types/components/layout/InfoBox.d.ts +8 -0
  32. package/dist/esm/types/components/layout/Menu.d.ts +2 -1
  33. package/dist/esm/types/components/layout/Modal.d.ts +2 -1
  34. package/dist/esm/types/components/layout/ModalContent.d.ts +8 -0
  35. package/dist/esm/types/components/layout/NavigationBar.d.ts +7 -4
  36. package/dist/esm/types/components/layout/index.d.ts +1 -0
  37. package/dist/esm/types/components/lists/DropdownMenuItem.d.ts +2 -1
  38. package/dist/esm/types/components/lists/HistoryItem.d.ts +3 -1
  39. package/dist/esm/types/components/lists/SettingsItem.d.ts +4 -1
  40. package/dist/esm/types/hooks/index.d.ts +1 -1
  41. package/dist/esm/types/hooks/useDropdownMenu.d.ts +10 -0
  42. package/dist/esm/types/stories/buttons/AssetsButton.stories.d.ts +2 -1
  43. package/dist/esm/types/stories/layout/InfoBox.stories.d.ts +7 -0
  44. package/dist/esm/types/stories/layout/ModalContent.stories.d.ts +8 -0
  45. package/dist/esm/types/stories/layout/NavigationBar.stories.d.ts +1 -0
  46. package/dist/esm/types/stories/lists/HistoryItem.stories.d.ts +1 -0
  47. package/dist/esm/types/stories/lists/SettingsItem.stories.d.ts +2 -0
  48. package/dist/index.css +47 -18
  49. package/dist/index.d.ts +42 -19
  50. package/package.json +1 -1
  51. package/dist/cjs/types/hooks/useModal.d.ts +0 -10
  52. package/dist/esm/types/hooks/useModal.d.ts +0 -10
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ import { TooltipProps } from '../controls';
2
3
  export interface SettingsItemProps {
3
4
  icon: React.ReactNode;
4
5
  label: string;
@@ -6,5 +7,7 @@ export interface SettingsItemProps {
6
7
  transparentControls?: boolean;
7
8
  showHelpIcon?: boolean;
8
9
  link?: string;
10
+ transparent?: boolean;
11
+ helpTooltip?: Omit<TooltipProps, 'children'>;
9
12
  }
10
- export declare function SettingsItem({ icon, label, controls, transparentControls, showHelpIcon, link, }: SettingsItemProps): import("react/jsx-runtime").JSX.Element;
13
+ export declare function SettingsItem({ icon, label, controls, transparentControls, showHelpIcon, link, transparent, helpTooltip, }: SettingsItemProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- export * from './useModal';
1
+ export * from './useDropdownMenu';
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ export declare function useDropdownMenu(props?: {
3
+ initialIsModalOpen?: boolean;
4
+ }): {
5
+ isDropdownOpen: boolean;
6
+ openDropdown: () => void;
7
+ closeDropdown: () => void;
8
+ dropdownRef: React.RefObject<HTMLDivElement>;
9
+ openDropdownButtonRef: React.RefObject<HTMLButtonElement>;
10
+ };
@@ -5,5 +5,6 @@ export default meta;
5
5
  type Story = StoryObj<typeof meta>;
6
6
  export declare const Empty: Story;
7
7
  export declare const ChainOnly: Story;
8
- export declare const ChainAndToken: Story;
8
+ export declare const ChainAndTokenLightText: Story;
9
+ export declare const ChainAndTokenDarkText: Story;
9
10
  export declare const LongTokenSymbol: Story;
@@ -0,0 +1,7 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { InfoBox } from '../../components/layout/InfoBox';
3
+ declare const meta: Meta<typeof InfoBox>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;
7
+ export declare const WithIcon: Story;
@@ -0,0 +1,8 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { ModalContent } from '../../components/layout/ModalContent';
3
+ declare const meta: Meta<typeof ModalContent>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;
7
+ export declare const WithBorder: Story;
8
+ export declare const WithOutline: Story;
@@ -7,5 +7,6 @@ export declare const Default: Story;
7
7
  export declare const Title: Story;
8
8
  export declare const BackButton: Story;
9
9
  export declare const Logo: Story;
10
+ export declare const WithActions: Story;
10
11
  export declare const AllProps: Story;
11
12
  export declare const Transparent: Story;
@@ -5,3 +5,4 @@ export default meta;
5
5
  type Story = StoryObj<typeof meta>;
6
6
  export declare const Default: Story;
7
7
  export declare const Pending: Story;
8
+ export declare const WithActions: Story;
@@ -8,3 +8,5 @@ export declare const WithControls: Story;
8
8
  export declare const WithoutHelpIcon: Story;
9
9
  export declare const TransparentControls: Story;
10
10
  export declare const Link: Story;
11
+ export declare const Transparent: Story;
12
+ export declare const WithHelpTooltip: Story;
package/dist/index.css CHANGED
@@ -605,10 +605,6 @@ video {
605
605
  left: -5px;
606
606
  }
607
607
 
608
- .-tw-left-\[85px\] {
609
- left: -85px;
610
- }
611
-
612
608
  .-tw-right-1\/3 {
613
609
  right: -33.333333%;
614
610
  }
@@ -633,6 +629,10 @@ video {
633
629
  top: -4px;
634
630
  }
635
631
 
632
+ .-tw-top-\[55px\] {
633
+ top: -55px;
634
+ }
635
+
636
636
  .-tw-top-full {
637
637
  top: -100%;
638
638
  }
@@ -649,6 +649,10 @@ video {
649
649
  bottom: 0.5rem;
650
650
  }
651
651
 
652
+ .tw-bottom-7 {
653
+ bottom: 1.75rem;
654
+ }
655
+
652
656
  .tw-bottom-full {
653
657
  bottom: 100%;
654
658
  }
@@ -669,8 +673,8 @@ video {
669
673
  left: -14px;
670
674
  }
671
675
 
672
- .tw-left-\[16px\] {
673
- left: 16px;
676
+ .tw-left-\[15px\] {
677
+ left: 15px;
674
678
  }
675
679
 
676
680
  .tw-left-\[54px\] {
@@ -697,6 +701,14 @@ video {
697
701
  right: 1rem;
698
702
  }
699
703
 
704
+ .tw-right-\[40px\] {
705
+ right: 40px;
706
+ }
707
+
708
+ .tw-right-\[calc\(100\%-10px\)\] {
709
+ right: calc(100% - 10px);
710
+ }
711
+
700
712
  .tw-right-squid-xxs {
701
713
  right: 0.3125rem;
702
714
  }
@@ -908,10 +920,6 @@ video {
908
920
  height: 46px;
909
921
  }
910
922
 
911
- .tw-h-\[470px\] {
912
- height: 470px;
913
- }
914
-
915
923
  .tw-h-\[50px\] {
916
924
  height: 50px;
917
925
  }
@@ -1000,10 +1008,6 @@ video {
1000
1008
  max-height: 540px;
1001
1009
  }
1002
1010
 
1003
- .tw-max-h-\[570px\] {
1004
- max-height: 570px;
1005
- }
1006
-
1007
1011
  .tw-max-h-\[600px\] {
1008
1012
  max-height: 600px;
1009
1013
  }
@@ -1495,6 +1499,10 @@ video {
1495
1499
  animation: tw-translate-to-top 0.4s ease-in-out both;
1496
1500
  }
1497
1501
 
1502
+ .tw-cursor-help {
1503
+ cursor: help;
1504
+ }
1505
+
1498
1506
  .tw-cursor-not-allowed {
1499
1507
  cursor: not-allowed;
1500
1508
  }
@@ -1627,10 +1635,6 @@ video {
1627
1635
  border-radius: 1rem;
1628
1636
  }
1629
1637
 
1630
- .tw-rounded-\[25px\] {
1631
- border-radius: 25px;
1632
- }
1633
-
1634
1638
  .tw-rounded-full {
1635
1639
  border-radius: 9999px;
1636
1640
  }
@@ -1808,6 +1812,11 @@ video {
1808
1812
  background-color: var(--squid-theme-royal-400) !important;
1809
1813
  }
1810
1814
 
1815
+ .tw-bg-\[\#FBFBFD\] {
1816
+ --tw-bg-opacity: 1;
1817
+ background-color: rgb(251 251 253 / var(--tw-bg-opacity));
1818
+ }
1819
+
1811
1820
  .tw-bg-blue-950 {
1812
1821
  --tw-bg-opacity: 1;
1813
1822
  background-color: rgb(23 37 84 / var(--tw-bg-opacity));
@@ -2218,6 +2227,10 @@ video {
2218
2227
  line-height: 1rem;
2219
2228
  }
2220
2229
 
2230
+ .\!tw-font-medium {
2231
+ font-weight: 500 !important;
2232
+ }
2233
+
2221
2234
  .tw-font-heading-bold {
2222
2235
  font-weight: 600;
2223
2236
  }
@@ -2497,6 +2510,10 @@ video {
2497
2510
  transition-duration: 150ms;
2498
2511
  }
2499
2512
 
2513
+ .tw-duration-200 {
2514
+ transition-duration: 200ms;
2515
+ }
2516
+
2500
2517
  .tw-duration-300 {
2501
2518
  transition-duration: 300ms;
2502
2519
  }
@@ -2569,6 +2586,10 @@ li {
2569
2586
  background-color: var(--squid-theme-material-light-thin);
2570
2587
  }
2571
2588
 
2589
+ .hover\:tw-text-grey-400:hover {
2590
+ color: var(--squid-theme-grey-400);
2591
+ }
2592
+
2572
2593
  .focus\:tw-bg-material-light-thin:focus {
2573
2594
  background-color: var(--squid-theme-material-light-thin);
2574
2595
  }
@@ -2577,6 +2598,10 @@ li {
2577
2598
  color: var(--squid-theme-royal-400);
2578
2599
  }
2579
2600
 
2601
+ .focus\:tw-opacity-100:focus {
2602
+ opacity: 1;
2603
+ }
2604
+
2580
2605
  .focus\:tw-outline-none:focus {
2581
2606
  outline: 2px solid transparent;
2582
2607
  outline-offset: 2px;
@@ -2627,6 +2652,10 @@ li {
2627
2652
  display: block;
2628
2653
  }
2629
2654
 
2655
+ .tw-peer:focus ~ .peer-focus\:tw-opacity-0 {
2656
+ opacity: 0;
2657
+ }
2658
+
2630
2659
  .aria-disabled\:tw-bg-grey-600[aria-disabled="true"] {
2631
2660
  background-color: var(--squid-theme-grey-600);
2632
2661
  }
package/dist/index.d.ts CHANGED
@@ -12,6 +12,11 @@ interface BadgeImageProps {
12
12
  type BadgeSize = 'sm' | 'md';
13
13
  declare function BadgeImage({ imageUrl, badgeUrl, size, extraMarginForBadge, rounded, }: BadgeImageProps): react_jsx_runtime.JSX.Element | null;
14
14
 
15
+ declare function LoadingSkeleton({ className, height, }: {
16
+ className?: string;
17
+ height?: string;
18
+ }): react_jsx_runtime.JSX.Element;
19
+
15
20
  interface UsdAmountProps {
16
21
  usdAmount: string;
17
22
  }
@@ -101,10 +106,10 @@ interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
101
106
  showIcon?: boolean;
102
107
  showPasteButton?: boolean;
103
108
  icon?: React.ReactNode;
104
- error?: string;
109
+ isError?: boolean;
105
110
  onPasteButtonClick?: () => void;
106
111
  }
107
- declare function Input({ placeholder, showIcon, showPasteButton, className, icon, error, onPasteButtonClick, ...props }: InputProps): react_jsx_runtime.JSX.Element;
112
+ declare function Input({ placeholder, showIcon, showPasteButton, className, icon, isError, onPasteButtonClick, ...props }: InputProps): react_jsx_runtime.JSX.Element;
108
113
 
109
114
  interface Props extends InputHTMLAttributes<HTMLInputElement> {
110
115
  onParsedValueChanged: (value: string) => void;
@@ -180,8 +185,9 @@ interface DropdownMenuItemProps {
180
185
  labelClassName?: string;
181
186
  imageUrl?: string;
182
187
  icon?: React.ReactNode;
188
+ onClick?: () => void;
183
189
  }
184
- declare function DropdownMenuItem({ label, imageUrl, icon, labelClassName, }: DropdownMenuItemProps): react_jsx_runtime.JSX.Element;
190
+ declare function DropdownMenuItem({ label, imageUrl, icon, labelClassName, onClick, }: DropdownMenuItemProps): react_jsx_runtime.JSX.Element;
185
191
 
186
192
  interface HistoryItemProps {
187
193
  firstImageUrl: string;
@@ -193,8 +199,9 @@ interface HistoryItemProps {
193
199
  dateCompleted: string;
194
200
  fromAmount: string;
195
201
  toAmount: string;
202
+ dropdownMenuItems?: DropdownMenuItemProps[];
196
203
  }
197
- declare function HistoryItem({ firstImageUrl, secondImageUrl, isPending, dateCompleted, fromAmount, fromLabel, toAmount, toLabel, pendingLabel, }: HistoryItemProps): react_jsx_runtime.JSX.Element;
204
+ declare function HistoryItem({ firstImageUrl, secondImageUrl, isPending, dateCompleted, fromAmount, fromLabel, toAmount, toLabel, pendingLabel, dropdownMenuItems, }: HistoryItemProps): react_jsx_runtime.JSX.Element;
198
205
 
199
206
  interface ListItemProps extends React.HTMLAttributes<HTMLLIElement> {
200
207
  itemTitle: string | React.ReactNode;
@@ -241,8 +248,10 @@ interface SettingsItemProps {
241
248
  transparentControls?: boolean;
242
249
  showHelpIcon?: boolean;
243
250
  link?: string;
251
+ transparent?: boolean;
252
+ helpTooltip?: Omit<TooltipProps, 'children'>;
244
253
  }
245
- declare function SettingsItem({ icon, label, controls, transparentControls, showHelpIcon, link, }: SettingsItemProps): react_jsx_runtime.JSX.Element;
254
+ declare function SettingsItem({ icon, label, controls, transparentControls, showHelpIcon, link, transparent, helpTooltip, }: SettingsItemProps): react_jsx_runtime.JSX.Element;
246
255
 
247
256
  interface SwapDetailListItemProps {
248
257
  label: string;
@@ -263,10 +272,13 @@ declare function SwapStepItem({ descriptionBlocks, chipContent, showStepSeparato
263
272
 
264
273
  interface DropdownMenuProps {
265
274
  dropdownRef?: React.RefObject<HTMLDivElement>;
275
+ menuRef?: React.RefObject<HTMLDivElement>;
266
276
  items: DropdownMenuItemProps[];
267
277
  className?: string;
278
+ isHidden?: boolean;
279
+ listClassName?: string;
268
280
  }
269
- declare function DropdownMenu({ dropdownRef, items, className, }: DropdownMenuProps): react_jsx_runtime.JSX.Element;
281
+ declare function DropdownMenu({ dropdownRef, items, className, menuRef, isHidden, listClassName, }: DropdownMenuProps): react_jsx_runtime.JSX.Element;
270
282
 
271
283
  type ErrorMessageProps = {
272
284
  message: string;
@@ -274,6 +286,13 @@ type ErrorMessageProps = {
274
286
  };
275
287
  declare function ErrorMessage({ message, showIcon }: ErrorMessageProps): react_jsx_runtime.JSX.Element;
276
288
 
289
+ interface InfoBoxProps {
290
+ title: string;
291
+ description: string;
292
+ icon?: React.ReactNode;
293
+ }
294
+ declare function InfoBox({ title, description, icon }: InfoBoxProps): react_jsx_runtime.JSX.Element;
295
+
277
296
  type Rounded = 'sm' | 'lg';
278
297
  interface MenuProps extends React$1.ComponentProps<'div'> {
279
298
  containerClassName?: string;
@@ -281,17 +300,23 @@ interface MenuProps extends React$1.ComponentProps<'div'> {
281
300
  title?: string;
282
301
  displayControls?: boolean;
283
302
  rounded?: Rounded;
303
+ menuRef?: React$1.RefObject<HTMLDivElement>;
284
304
  }
285
- declare function Menu({ children, containerClassName, contentClassName, title, displayControls, rounded, ...props }: MenuProps): react_jsx_runtime.JSX.Element;
305
+ declare function Menu({ children, containerClassName, contentClassName, title, displayControls, rounded, menuRef, ...props }: MenuProps): react_jsx_runtime.JSX.Element;
286
306
 
287
307
  interface ModalProps {
288
308
  children: React.ReactNode;
289
309
  className?: string;
290
310
  onBackdropClick?: () => void;
291
311
  isOpen?: boolean;
312
+ maxHeight?: boolean;
292
313
  }
293
- declare function Modal({ children, className, onBackdropClick, isOpen: _isOpen, }: ModalProps): false | react_jsx_runtime.JSX.Element;
314
+ declare function Modal({ children, className, onBackdropClick, isOpen: _isOpen, maxHeight, }: ModalProps): false | react_jsx_runtime.JSX.Element;
294
315
 
316
+ type ActionButton = {
317
+ labelOrIcon: string | React.ReactNode;
318
+ onClick?: () => void;
319
+ };
295
320
  interface NavigationBarProps {
296
321
  title?: string;
297
322
  displayBackButton?: boolean;
@@ -299,11 +324,9 @@ interface NavigationBarProps {
299
324
  transparent?: boolean;
300
325
  displayButtonShadows?: boolean;
301
326
  onBackButtonClick?: () => void;
302
- onAddressButtonClick?: () => void;
303
- label?: string;
304
- isLoading?: boolean;
327
+ actions?: ActionButton[];
305
328
  }
306
- declare function NavigationBar({ title, displayBackButton, logoUrl, transparent, displayButtonShadows, onBackButtonClick, label, onAddressButtonClick, isLoading, }: NavigationBarProps): react_jsx_runtime.JSX.Element;
329
+ declare function NavigationBar({ title, displayBackButton, logoUrl, transparent, displayButtonShadows, onBackButtonClick, actions, }: NavigationBarProps): react_jsx_runtime.JSX.Element;
307
330
 
308
331
  declare function ProductCard({ children }: React.PropsWithChildren): react_jsx_runtime.JSX.Element;
309
332
 
@@ -424,14 +447,14 @@ declare function SquidConfigProvider({ theme, children, themeType, }: {
424
447
  themeType?: ThemeType;
425
448
  }): react_jsx_runtime.JSX.Element;
426
449
 
427
- declare function useModal(props?: {
450
+ declare function useDropdownMenu(props?: {
428
451
  initialIsModalOpen?: boolean;
429
452
  }): {
430
- isModalOpen: boolean;
431
- openModal: () => void;
432
- closeModal: () => void;
433
- modalRef: React.RefObject<HTMLDivElement>;
434
- openModalButtonRef: React.RefObject<HTMLButtonElement>;
453
+ isDropdownOpen: boolean;
454
+ openDropdown: () => void;
455
+ closeDropdown: () => void;
456
+ dropdownRef: React.RefObject<HTMLDivElement>;
457
+ openDropdownButtonRef: React.RefObject<HTMLButtonElement>;
435
458
  };
436
459
 
437
- export { AddressButton, ArrowButton, AssetsButton, BadgeImage, BodyText, Boost, BoostButton, Button, CaptionText, Chip, DetailsToolbar, DropdownMenu, DropdownMenuItem, type DropdownMenuItemProps, ErrorMessage, FeeButton, HeadingText, HistoryItem, Input, ListItem, Menu, MenuItem, Modal, NavigationBar, NumericInput, ProductCard, ProfileHeaderBackground, SectionTitle, SettingsButton, type SettingsButtonProps, SettingsItem, type SettingsItemProps, SettingsSlider, type SettingsSliderProps, SquidConfigProvider, type SquidTheme, SwapConfiguration, SwapDetailListItem, SwapProgressViewHeader, SwapStepItem, SwapStepsCollapsed, Switch, TokenPair, Tooltip, type TooltipThreshold, type TooltipWidth, UsdAmount, useModal };
460
+ export { AddressButton, ArrowButton, AssetsButton, BadgeImage, BodyText, Boost, BoostButton, Button, CaptionText, Chip, DetailsToolbar, DropdownMenu, DropdownMenuItem, type DropdownMenuItemProps, ErrorMessage, FeeButton, HeadingText, HistoryItem, InfoBox, Input, ListItem, LoadingSkeleton, Menu, MenuItem, Modal, NavigationBar, NumericInput, ProductCard, ProfileHeaderBackground, SectionTitle, SettingsButton, type SettingsButtonProps, SettingsItem, type SettingsItemProps, SettingsSlider, type SettingsSliderProps, SquidConfigProvider, type SquidTheme, SwapConfiguration, SwapDetailListItem, SwapProgressViewHeader, SwapStepItem, SwapStepsCollapsed, Switch, TokenPair, Tooltip, type TooltipProps, type TooltipThreshold, type TooltipWidth, UsdAmount, useDropdownMenu };
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "url": "git+https://github.com/0xsquid/squid-ui.git"
6
6
  },
7
7
  "description": "Squid's UI components",
8
- "version": "0.8.3",
8
+ "version": "0.9.1",
9
9
  "author": "",
10
10
  "license": "MIT",
11
11
  "scripts": {
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- export declare function useModal(props?: {
3
- initialIsModalOpen?: boolean;
4
- }): {
5
- isModalOpen: boolean;
6
- openModal: () => void;
7
- closeModal: () => void;
8
- modalRef: React.RefObject<HTMLDivElement>;
9
- openModalButtonRef: React.RefObject<HTMLButtonElement>;
10
- };
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- export declare function useModal(props?: {
3
- initialIsModalOpen?: boolean;
4
- }): {
5
- isModalOpen: boolean;
6
- openModal: () => void;
7
- closeModal: () => void;
8
- modalRef: React.RefObject<HTMLDivElement>;
9
- openModalButtonRef: React.RefObject<HTMLButtonElement>;
10
- };