diff --git a/app/actions/index.ts b/app/actions/index.ts index ed2218aca..e088c0026 100644 --- a/app/actions/index.ts +++ b/app/actions/index.ts @@ -49,9 +49,7 @@ export function actionToMenuItem( const title = resolve(action.name, context); const icon = resolvedIcon && action.iconInContextMenu !== false - ? React.cloneElement(resolvedIcon, { - color: "currentColor", - }) + ? resolvedIcon : undefined; if (resolvedChildren) { diff --git a/app/components/Arrow.tsx b/app/components/Arrow.tsx index ba462d577..149feb457 100644 --- a/app/components/Arrow.tsx +++ b/app/components/Arrow.tsx @@ -6,17 +6,11 @@ export default function Arrow() { width="13" height="30" viewBox="0 0 13 30" - fill="none" + fill="currentColor" xmlns="http://www.w3.org/2000/svg" > - - + + ); } diff --git a/app/components/Button.tsx b/app/components/Button.tsx index e374ea564..551ce6529 100644 --- a/app/components/Button.tsx +++ b/app/components/Button.tsx @@ -14,7 +14,6 @@ type RealProps = { $borderOnHover?: boolean; $neutral?: boolean; $danger?: boolean; - $iconColor?: string; }; const RealButton = styled(ActionButton)` @@ -37,14 +36,6 @@ const RealButton = styled(ActionButton)` appearance: none !important; ${undraggableOnDesktop()} - ${(props) => - !props.$borderOnHover && - ` - svg { - fill: ${props.$iconColor || "currentColor"}; - } - `} - &::-moz-focus-inner { padding: 0; border: 0; @@ -77,15 +68,6 @@ const RealButton = styled(ActionButton)` : `rgba(0, 0, 0, 0.07) 0px 1px 2px, ${props.theme.buttonNeutralBorder} 0 0 0 1px inset` }; - ${ - props.$borderOnHover - ? "" - : `svg { - fill: ${props.$iconColor || "currentColor"}; - }` - } - - &:hover:not(:disabled), &[aria-expanded="true"] { background: ${ @@ -156,7 +138,6 @@ export const Inner = styled.span<{ export type Props = ActionButtonProps & { icon?: React.ReactNode; - iconColor?: string; children?: React.ReactNode; disclosure?: boolean; neutral?: boolean; @@ -184,7 +165,6 @@ const Button = ( neutral, action, icon, - iconColor, borderOnHover, hideIcon, fullwidth, @@ -204,13 +184,12 @@ const Button = ( $danger={danger} $fullwidth={fullwidth} $borderOnHover={borderOnHover} - $iconColor={iconColor} {...rest} > {hasIcon && ic} {hasText && } - {disclosure && } + {disclosure && } ); diff --git a/app/components/CommandBarItem.tsx b/app/components/CommandBarItem.tsx index 7d578e784..c99b4a0eb 100644 --- a/app/components/CommandBarItem.tsx +++ b/app/components/CommandBarItem.tsx @@ -39,10 +39,9 @@ function CommandBarItem( // @ts-expect-error no icon on ActionImpl React.cloneElement(action.icon, { size: 22, - color: "currentColor", }) ) : ( - + )} diff --git a/app/components/ContextMenu/MenuItem.tsx b/app/components/ContextMenu/MenuItem.tsx index 79fdf459c..b58d33c8f 100644 --- a/app/components/ContextMenu/MenuItem.tsx +++ b/app/components/ContextMenu/MenuItem.tsx @@ -78,15 +78,11 @@ const MenuItem = ( > {selected !== undefined && ( <> - {selected ? : } + {selected ? : }   )} - {icon && ( - - {React.cloneElement(icon, { color: "currentColor" })} - - )} + {icon && {icon}} {children} )} diff --git a/app/components/ContextMenu/OverflowMenuButton.tsx b/app/components/ContextMenu/OverflowMenuButton.tsx index 1f25baf96..f72fd93e9 100644 --- a/app/components/ContextMenu/OverflowMenuButton.tsx +++ b/app/components/ContextMenu/OverflowMenuButton.tsx @@ -5,19 +5,14 @@ import NudeButton from "~/components/NudeButton"; type Props = React.ComponentProps & { className?: string; - iconColor?: string; }; -export default function OverflowMenuButton({ - iconColor, - className, - ...rest -}: Props) { +export default function OverflowMenuButton({ className, ...rest }: Props) { return ( {(props) => ( - + )} diff --git a/app/components/DefaultCollectionInputSelect.tsx b/app/components/DefaultCollectionInputSelect.tsx index c811dc0c9..9a9637eef 100644 --- a/app/components/DefaultCollectionInputSelect.tsx +++ b/app/components/DefaultCollectionInputSelect.tsx @@ -73,7 +73,7 @@ const DefaultCollectionInputSelect = ({ label: ( - + {t("Home")} diff --git a/app/components/DocumentBreadcrumb.tsx b/app/components/DocumentBreadcrumb.tsx index 89fc5e3a4..952ef2c1b 100644 --- a/app/components/DocumentBreadcrumb.tsx +++ b/app/components/DocumentBreadcrumb.tsx @@ -22,7 +22,7 @@ function useCategory(document: Document): MenuInternalLink | null { if (document.isDeleted) { return { type: "route", - icon: , + icon: , title: t("Trash"), to: "/trash", }; @@ -31,7 +31,7 @@ function useCategory(document: Document): MenuInternalLink | null { if (document.isArchived) { return { type: "route", - icon: , + icon: , title: t("Archive"), to: "/archive", }; @@ -40,7 +40,7 @@ function useCategory(document: Document): MenuInternalLink | null { if (document.isTemplate) { return { type: "route", - icon: , + icon: , title: t("Templates"), to: "/templates", }; diff --git a/app/components/DocumentCard.tsx b/app/components/DocumentCard.tsx index 14a2df413..81a74aa22 100644 --- a/app/components/DocumentCard.tsx +++ b/app/components/DocumentCard.tsx @@ -128,7 +128,7 @@ function DocumentCard(props: Props) { : document.titleWithDefault} - +