design-react-kit 5.5.0 → 5.5.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/CHANGELOG.md +9 -0
- package/dist/Dropdown/DropdownMenu.cjs +1 -1
- package/dist/Dropdown/DropdownMenu.cjs.map +1 -1
- package/dist/Dropdown/DropdownMenu.js +3 -1
- package/dist/Dropdown/DropdownMenu.js.map +1 -1
- package/dist/Megamenu/MegamenuItem.cjs +1 -1
- package/dist/Megamenu/MegamenuItem.cjs.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/package.json +1 -1
- package/src/Dropdown/DropdownMenu.tsx +3 -6
package/package.json
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import React, { FC, HTMLAttributes } from 'react';
|
|
2
2
|
import { DropdownMenu as BSDRopdownMenu } from 'reactstrap';
|
|
3
|
-
|
|
4
|
-
// .it-header-slim-wrapper .it-header-slim-wrapper-content .dropdown-menu {
|
|
5
|
-
// top: unset !important;
|
|
6
|
-
// }
|
|
3
|
+
import { SLIM, useHeaderContext } from '../Header/HeaderContext';
|
|
7
4
|
|
|
8
5
|
export interface DropdownMenuProps extends HTMLAttributes<HTMLElement> {
|
|
9
6
|
/** Classi aggiuntive da usare per il componente Button */
|
|
@@ -13,9 +10,9 @@ export interface DropdownMenuProps extends HTMLAttributes<HTMLElement> {
|
|
|
13
10
|
}
|
|
14
11
|
|
|
15
12
|
export const DropdownMenu: FC<DropdownMenuProps> = ({ className, inNavbar, testId, children, ...attributes }) => {
|
|
13
|
+
const type = useHeaderContext();
|
|
14
|
+
const style = inNavbar && type === SLIM ? { top: 'unset !important' } : {};
|
|
16
15
|
|
|
17
|
-
const style = inNavbar ? {'top' : 'unset !important'} : {}
|
|
18
|
-
|
|
19
16
|
return (
|
|
20
17
|
<BSDRopdownMenu style={style} data-testid={testId} {...attributes} className={className}>
|
|
21
18
|
{children}
|