design-react-kit 5.7.0 → 5.7.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.
package/package.json CHANGED
@@ -25,7 +25,7 @@
25
25
  "bugs": {
26
26
  "url": "https://github.com/italia/design-react-kit/issues"
27
27
  },
28
- "version": "5.7.0",
28
+ "version": "5.7.1",
29
29
  "license": "BSD-3",
30
30
  "type": "module",
31
31
  "module": "./dist/index.js",
@@ -140,7 +140,6 @@
140
140
  "classnames": "^2.3.1",
141
141
  "is-number": "^7.0.0",
142
142
  "react-bootstrap": "^2.10.6",
143
- "react-stickup": "^1.12.1",
144
143
  "react-toastify": "^7.0.4",
145
144
  "react-transition-group": "^4.4.5",
146
145
  "reactstrap": "9.2.2",
@@ -1,7 +1,5 @@
1
1
  import React, { FC, HTMLAttributes } from 'react';
2
2
  import classNames from 'classnames';
3
- import { Sticky, StickyProvider } from 'react-stickup';
4
-
5
3
  export interface HeadersProps extends HTMLAttributes<HTMLElement> {
6
4
  /** Aggiunge un ombra per enfatizzare il componente rispetto alla pagina in cui è contenuto */
7
5
  shadow?: boolean;
@@ -17,18 +15,11 @@ export const Headers: FC<HeadersProps> = ({ className, shadow = false, sticky =
17
15
  'it-header-wrapper',
18
16
  {
19
17
  'it-shadow': shadow,
20
- 'it-header-sticky': sticky
18
+ 'it-header-sticky': sticky,
19
+ 'sticky-top': sticky
20
+
21
21
  },
22
22
  className
23
23
  );
24
- if (!sticky) {
25
- return <div className={classes} {...attributes} data-testid={testId}></div>;
26
- }
27
- return (
28
- <StickyProvider>
29
- <Sticky style={{ position: 'sticky', zIndex: 2 }} data-testid={testId}>
30
- <div className={classes} {...attributes}></div>
31
- </Sticky>
32
- </StickyProvider>
33
- );
24
+ return <div className={classes} {...attributes} data-testid={testId}></div>;
34
25
  };