diff --git a/src/core/Icon.tsx b/src/core/Icon.tsx index 740a5ae55..a6e4370e8 100644 --- a/src/core/Icon.tsx +++ b/src/core/Icon.tsx @@ -4,7 +4,7 @@ import { IconName } from "./Icon/types"; import { ColorClass } from "./styles/colors/types"; import { convertTailwindClassToVar } from "./styles/colors/utils"; -type IconProps = { +export type IconProps = { name: IconName; size?: string; color?: ColorClass; diff --git a/src/core/Icon/EncapsulatedIcon.tsx b/src/core/Icon/EncapsulatedIcon.tsx new file mode 100644 index 000000000..709ab2177 --- /dev/null +++ b/src/core/Icon/EncapsulatedIcon.tsx @@ -0,0 +1,35 @@ +import React from "react"; +import Icon, { IconProps } from "../Icon"; +import { determineThemeColor } from "../styles/colors/utils"; +import { ColorClass, Theme } from "../styles/colors/types"; + +type EncapsulatedIconProps = { + theme?: Theme; + className?: string; +} & IconProps; + +const EncapsulatedIcon = ({ + theme = "dark", + size = "40px", + className, + ...iconProps +}: EncapsulatedIconProps) => { + const t = (color: ColorClass) => determineThemeColor("dark", theme, color); + const numericalSize = parseInt(size, 10); + + return ( +
{icon}
+ icon-product-asset-tracking
+
+
+ icon-product-chat
+
+
+ icon-product-liveobjects
+
+
+ icon-product-livesync
+
+
+ icon-product-pubsub
+
+
+ icon-product-spaces
+
+
- quote
+ icon-product-asset-tracking
- icon-product-asset-tracking
+ icon-product-chat
- icon-product-chat
+ icon-product-liveobjects
- icon-product-liveobjects
+ icon-product-livesync
- icon-product-livesync
+ icon-product-pubsub
- icon-product-pubsub
+ icon-product-spaces
- icon-product-spaces
+ quote
- icon-product-pubsub-encapsulated
+ icon-product-asset-tracking
- icon-product-chat-encapsulated
+ icon-product-chat
- icon-product-spaces-encapsulated
+ icon-product-liveobjects
- icon-product-livesync-encapsulated
+ icon-product-livesync
- icon-product-asset-tracking-encapsulated
+ icon-product-pubsub
- icon-product-liveobjects-encapsulated
+ icon-product-spaces