diff --git a/app/hooks/useSettingsConfig.ts b/app/hooks/useSettingsConfig.ts index 6a2246979b..108f6aa506 100644 --- a/app/hooks/useSettingsConfig.ts +++ b/app/hooks/useSettingsConfig.ts @@ -1,4 +1,3 @@ -import type { Icon } from "outline-icons"; import { EmailIcon, ProfileIcon, @@ -19,7 +18,6 @@ import { SmileyIcon, BuildingBlocksIcon, } from "outline-icons"; -import type { ComponentProps } from "react"; import { useEffect } from "react"; import { useTranslation } from "react-i18next"; import { integrationSettingsPath } from "@shared/utils/routeHelpers"; @@ -54,7 +52,11 @@ const CustomEmojis = lazy(() => import("~/scenes/Settings/CustomEmojis")); export type ConfigItem = { name: string; path: string; - icon: React.FC>; + icon: React.FC<{ + size?: number; + fill?: string; + monochrome?: boolean; + }>; component: React.ComponentType; description?: string; preload?: () => void; diff --git a/app/scenes/Settings/components/IntegrationCard.tsx b/app/scenes/Settings/components/IntegrationCard.tsx index d6e4bf875d..1a1050461a 100644 --- a/app/scenes/Settings/components/IntegrationCard.tsx +++ b/app/scenes/Settings/components/IntegrationCard.tsx @@ -5,7 +5,6 @@ import { s, ellipsis, hover } from "@shared/styles"; import type { ConfigItem } from "~/hooks/useSettingsConfig"; import Button from "../../../components/Button"; import Text from "../../../components/Text"; -import { HStack } from "~/components/primitives/HStack"; import { VStack } from "~/components/primitives/VStack"; import { Status } from "./Status"; import Flex from "@shared/components/Flex"; @@ -20,14 +19,14 @@ function IntegrationCard({ integration, isConnected }: Props) { return ( - - - - + + + + {integration.name} {isConnected && {t("Connected")}} - + diff --git a/plugins/figma/client/Icon.tsx b/plugins/figma/client/Icon.tsx index dd1b2559e3..425f166d96 100644 --- a/plugins/figma/client/Icon.tsx +++ b/plugins/figma/client/Icon.tsx @@ -5,9 +5,15 @@ type Props = { size?: number; /** The color of the icon, defaults to the current text color */ fill?: string; + /** Whether to render the monochrome version, defaults to true */ + monochrome?: boolean; }; -export default function Icon({ size = 24, fill = "currentColor" }: Props) { +export default function Icon({ + size = 24, + fill = "currentColor", + monochrome = true, +}: Props) { return ( - + {monochrome ? ( + + ) : ( + <> + + + + + + + )} ); } diff --git a/plugins/gitlab/client/components/Icon.tsx b/plugins/gitlab/client/components/Icon.tsx index bfb291c587..08b03d4a6f 100644 --- a/plugins/gitlab/client/components/Icon.tsx +++ b/plugins/gitlab/client/components/Icon.tsx @@ -1,13 +1,17 @@ -import * as React from "react"; - type Props = { /** The size of the icon, 24px is default to match standard icons */ size?: number; /** The color of the icon, defaults to the current text color */ fill?: string; + /** Whether to render the monochrome version, defaults to true */ + monochrome?: boolean; }; -export default function Icon({ size = 24, fill = "currentColor" }: Props) { +export default function Icon({ + size = 24, + fill = "currentColor", + monochrome = true, +}: Props) { return ( - - - - + + + + ); } diff --git a/plugins/googleanalytics/client/Icon.tsx b/plugins/googleanalytics/client/Icon.tsx index a8f7cc3aca..8cf01e4424 100644 --- a/plugins/googleanalytics/client/Icon.tsx +++ b/plugins/googleanalytics/client/Icon.tsx @@ -5,10 +5,15 @@ type Props = { size?: number; /** The color of the icon, defaults to the current text color */ fill?: string; - className?: string; + /** Whether to render the monochrome version, defaults to true */ + monochrome?: boolean; }; -function GoogleLogo({ size = 24, fill = "currentColor", className }: Props) { +function GoogleLogo({ + size = 24, + fill = "currentColor", + monochrome = true, +}: Props) { return ( - + + + ); } diff --git a/plugins/slack/client/Icon.tsx b/plugins/slack/client/Icon.tsx index 07088c863a..2ec94a5944 100644 --- a/plugins/slack/client/Icon.tsx +++ b/plugins/slack/client/Icon.tsx @@ -5,9 +5,15 @@ type Props = { size?: number; /** The color of the icon, defaults to the current text color */ fill?: string; + /** Whether to render the monochrome version, defaults to true */ + monochrome?: boolean; }; -export default function Icon({ size = 24, fill = "currentColor" }: Props) { +export default function Icon({ + size = 24, + fill = "currentColor", + monochrome = true, +}: Props) { return ( - + {monochrome ? ( + + ) : ( + <> + + + + + + )} ); } diff --git a/plugins/zapier/client/Icon.tsx b/plugins/zapier/client/Icon.tsx index e52109472e..13875098d1 100644 --- a/plugins/zapier/client/Icon.tsx +++ b/plugins/zapier/client/Icon.tsx @@ -5,17 +5,20 @@ type Props = { size?: number; /** The color of the icon, defaults to the current text color */ color?: string; + /** Whether to render the monochrome version, defaults to true */ + monochrome?: boolean; }; export default function ZapierIcon({ size = 24, color = "currentColor", + monochrome = true, }: Props) { return (