chore: Upgrade outline-icons (typescript)

This commit is contained in:
Tom Moor
2021-12-03 17:32:19 -06:00
parent 7c37724f88
commit e4f0ef6ddf
9 changed files with 11 additions and 18 deletions

View File

@@ -113,7 +113,7 @@ function Collections() {
);
}
const Disclosure = styled(CollapsedIcon)`
const Disclosure = styled(CollapsedIcon)<{ expanded?: boolean }>`
transition: transform 100ms ease, fill 50ms !important;
${({ expanded }) => !expanded && "transform: rotate(-90deg);"};
`;

View File

@@ -1,7 +1,7 @@
import { CollapsedIcon } from "outline-icons";
import styled from "styled-components";
const Disclosure = styled(CollapsedIcon)`
const Disclosure = styled(CollapsedIcon)<{ expanded?: boolean }>`
transition: transform 100ms ease, fill 50ms !important;
position: absolute;
left: -24px;

View File

@@ -160,7 +160,7 @@ function Starred() {
);
}
const Disclosure = styled(CollapsedIcon)`
const Disclosure = styled(CollapsedIcon)<{ expanded?: boolean }>`
transition: transform 100ms ease, fill 50ms !important;
${({ expanded }) => !expanded && "transform: rotate(-90deg);"};
`;

View File

@@ -44,7 +44,7 @@ function StarredLink({ depth, title, to, documentId, collectionId }: Props) {
}, [collection, collectionId, collections, document, documentId, documents]);
const handleDisclosureClick = React.useCallback(
(ev: React.MouseEvent<HTMLDivElement>) => {
(ev: React.MouseEvent<SVGElement>) => {
ev.preventDefault();
ev.stopPropagation();
setExpanded((prevExpanded) => !prevExpanded);