@xqmsg/ui-core 0.19.1 → 0.19.2

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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.19.1",
2
+ "version": "0.19.2",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -230,7 +230,6 @@ const StackedPilledInput = React.forwardRef<
230
230
  ref: inputWrapperRef,
231
231
  handler: () => {
232
232
  onBlur();
233
- console.log('hi');
234
233
  },
235
234
  });
236
235
 
@@ -24,7 +24,6 @@ export const ToolbarBreadcrumbItem: React.FC<ToolbarBreadcrumbItemProps> = ({
24
24
  const getPageLabel = useMemo(() => {
25
25
  if (breakpoint400) {
26
26
  if (page === 'current') {
27
- console.log('hi');
28
27
  return pageLabel;
29
28
  }
30
29
  }
@@ -1,13 +1,16 @@
1
1
  import { ToastPosition, useToast as useChakraToast } from '@chakra-ui/react';
2
- import React from 'react';
2
+ import React, { useCallback } from 'react';
3
3
  import { Toast, ToastProps } from '../components/toast';
4
4
 
5
- export const useToast = (props: ToastProps & { position: ToastPosition }) => {
5
+ export const useToast = () => {
6
6
  const toast = useChakraToast();
7
7
 
8
- return () =>
9
- toast({
10
- position: props.position,
11
- render: () => <Toast {...props} />,
12
- });
8
+ return useCallback(
9
+ (props: ToastProps & { position: ToastPosition }) =>
10
+ toast({
11
+ position: props.position,
12
+ render: () => <Toast {...props} />,
13
+ }),
14
+ [toast]
15
+ );
13
16
  };