@mailstep/design-system 0.5.0-beta.21 → 0.5.0-beta.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mailstep/design-system",
3
- "version": "0.5.0-beta.21",
3
+ "version": "0.5.0-beta.22",
4
4
  "license": "ISC",
5
5
  "type": "module",
6
6
  "main": "./ui/index.js",
@@ -0,0 +1,3 @@
1
+ import { FloatingButtonProps, Item } from '../types';
2
+ declare const useFloatingButton: (hasPermission: any, onClick?: () => void, options?: Item[], onSelect?: ((value: string) => void) | undefined) => FloatingButtonProps | undefined;
3
+ export default useFloatingButton;
@@ -0,0 +1,13 @@
1
+ import { useMemo } from 'react';
2
+ var useFloatingButton = function (hasPermission, onClick, options, onSelect) {
3
+ return useMemo(function () {
4
+ if (!hasPermission)
5
+ return;
6
+ return {
7
+ onClick: onClick,
8
+ options: options,
9
+ onSelect: onSelect,
10
+ };
11
+ }, [hasPermission, onClick, options, onSelect]);
12
+ };
13
+ export default useFloatingButton;
@@ -1,9 +1,10 @@
1
1
  import CommonGrid from './CommonGridContainer';
2
2
  import withReduxActions from './HoC/withReduxActions';
3
3
  import reducer, { actionPrefix, createActions, createSelectors, createFullSelector, actionTypes } from './store';
4
+ import useFloatingButton from './hooks/useFloatingButton';
4
5
  import * as Types from './types';
5
6
  import * as utils from './utils/public';
6
7
  export * from './StandardButtons';
7
8
  export * from './components/gridCells';
8
9
  export default CommonGrid;
9
- export { withReduxActions, reducer, actionPrefix, actionTypes, createActions, createSelectors, createFullSelector, Types, utils };
10
+ export { withReduxActions, reducer, actionPrefix, actionTypes, createActions, createSelectors, createFullSelector, Types, utils, useFloatingButton, };
@@ -1,9 +1,10 @@
1
1
  import CommonGrid from './CommonGridContainer';
2
2
  import withReduxActions from './HoC/withReduxActions';
3
3
  import reducer, { actionPrefix, createActions, createSelectors, createFullSelector, actionTypes } from './store';
4
+ import useFloatingButton from './hooks/useFloatingButton';
4
5
  import * as Types from './types';
5
6
  import * as utils from './utils/public';
6
7
  export * from './StandardButtons';
7
8
  export * from './components/gridCells';
8
9
  export default CommonGrid;
9
- export { withReduxActions, reducer, actionPrefix, actionTypes, createActions, createSelectors, createFullSelector, Types, utils };
10
+ export { withReduxActions, reducer, actionPrefix, actionTypes, createActions, createSelectors, createFullSelector, Types, utils, useFloatingButton, };