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

@@ -54,7 +54,7 @@ function DocumentTasks({ document }: Props) {
);
}
const Done = styled(DoneIcon)`
const Done = styled(DoneIcon)<{ $animated: boolean }>`
margin: -1px;
animation: ${(props) => (props.$animated ? bounceIn : "none")} 600ms;
transform-origin: center center;

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);

View File

@@ -24,12 +24,7 @@ function SearchInput({ defaultValue, ...rest }: Props) {
return (
<Wrapper align="center">
<StyledIcon
type="Search"
size={46}
color={theme.textTertiary}
onClick={focusInput}
/>
<StyledIcon size={46} color={theme.textTertiary} onClick={focusInput} />
<StyledInput
{...rest}
defaultValue={defaultValue}

View File

@@ -2,8 +2,6 @@ declare module "autotrack/autotrack.js";
declare module "boundless-arrow-key-navigation";
declare module "outline-icons";
declare module "string-replace-to-array";
declare module "styled-components-breakpoint";