diff --git a/src/DropdownMenu/DropdownMenu.tsx b/src/DropdownMenu/DropdownMenu.tsx index 3d173a55f..b56d37807 100644 --- a/src/DropdownMenu/DropdownMenu.tsx +++ b/src/DropdownMenu/DropdownMenu.tsx @@ -1,6 +1,5 @@ import React, { useMemo } from "react"; import propTypes from "@styled-system/prop-types"; -import { Reference } from "react-popper"; import { IconicButton } from "../Button"; import { ComponentSize, useComponentSize } from "../NDSProvider/ComponentSizeContext"; import { Popper } from "../Popper"; @@ -9,6 +8,7 @@ import { StyledProps } from "../StyledProps"; import DropdownMenuContainer from "./DropdownMenuContainer"; type DropdownMenuProps = { + children?: React.ReactNode; className?: string; size?: ComponentSize; id?: string; @@ -47,10 +47,7 @@ const transformPropsToModifiers = ({ boundariesElement }) => ({ boundariesElement, }); -const DropdownMenu: React.FC> = React.forwardRef< - Reference, - DropdownMenuProps ->( +const DropdownMenu = React.forwardRef, DropdownMenuProps>( ( { trigger = () => , diff --git a/src/List/ListItem.tsx b/src/List/ListItem.tsx index a45b1bacd..27b024552 100644 --- a/src/List/ListItem.tsx +++ b/src/List/ListItem.tsx @@ -1,12 +1,20 @@ +import React from "react"; import styled from "styled-components"; import { space, color, typography, SpaceProps, ColorProps, TypographyProps } from "styled-system"; type Props = React.ComponentPropsWithRef<"li"> & SpaceProps & ColorProps & TypographyProps; -const ListItem = styled.li(space, color, typography, { - "&:last-child": { - marginBottom: 0, - }, -}); +const ListItem = styled.li( + ({ theme }) => ({ + color: "currentcolor", + marginBottom: theme.space.x1, + "&:last-child": { + marginBottom: 0, + }, + }), + space, + color, + typography +); export default ListItem; diff --git a/src/Popper/Popper.tsx b/src/Popper/Popper.tsx index 8399c8d7d..d131c81dc 100644 --- a/src/Popper/Popper.tsx +++ b/src/Popper/Popper.tsx @@ -31,7 +31,7 @@ type PopperProps = { closeAriaLabel?: string; }; -const Popper = React.forwardRef( +const Popper = React.forwardRef, PopperProps>( ( { id, diff --git a/src/Tooltip/Tooltip.tsx b/src/Tooltip/Tooltip.tsx index c5062e3ed..1cc206789 100644 --- a/src/Tooltip/Tooltip.tsx +++ b/src/Tooltip/Tooltip.tsx @@ -1,4 +1,4 @@ -import React from "react"; +import React, { LegacyRef } from "react"; import { Popper } from "../Popper"; import { generateId } from "../utils"; import TooltipContainer from "./TooltipContainer"; @@ -26,7 +26,7 @@ export type TooltipProps = { children?: React.ReactNode; }; -const Tooltip = React.forwardRef( +const Tooltip = React.forwardRef, TooltipProps>( ( { showDelay = "100",