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..1a07e88a7 100644 --- a/src/Popper/Popper.tsx +++ b/src/Popper/Popper.tsx @@ -31,7 +31,8 @@ type PopperProps = { closeAriaLabel?: string; }; -const Popper = React.forwardRef( +// We can't get rid of the any here because Popper types are loose too +const Popper = React.forwardRef, PopperProps>( ( { id, diff --git a/src/Tooltip/Tooltip.tsx b/src/Tooltip/Tooltip.tsx index c5062e3ed..25528e233 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,8 @@ export type TooltipProps = { children?: React.ReactNode; }; -const Tooltip = React.forwardRef( +// We can't get rid of the any type here because Popper types are loose too +const Tooltip = React.forwardRef, TooltipProps>( ( { showDelay = "100",