+
)}
diff --git a/packages/icon/components/Icon.tsx b/packages/icon/components/Icon.tsx
index 869cde2e3..af409258d 100644
--- a/packages/icon/components/Icon.tsx
+++ b/packages/icon/components/Icon.tsx
@@ -11,17 +11,33 @@ const DEFAULT_ICON_SIZE: IconSize = "s";
export type IconShapes = SystemIcons | ProductIcons;
export interface IconProps {
- /** If an icon is more than decorative and requires further context include a description for screen readers */
+ /**
+ * If an icon is more than decorative and requires further context include a description for screen readers
+ */
ariaLabel?: string;
- /** The fill color of the icon */
+ /**
+ * Allows custom styling
+ */
+ className?: string;
+ /**
+ * The fill color of the icon
+ */
color?: string;
- /** The id of the SVG symbol we're rendering from a generated sprite */
+ /**
+ * The id of the SVG symbol we're rendering from a generated sprite
+ */
shape: SystemIcons | ProductIcons;
- /** Which icon size to use for the width and height of the icon */
+ /**
+ * Which icon size to use for the width and height of the icon
+ */
size?: IconSize;
- /** human-readable selector used for writing tests */
+ /**
+ * human-readable selector used for writing tests
+ */
["data-cy"]?: string;
- /** Sets display to block if true */
+ /**
+ * Sets display to block if true
+ */
block?: boolean;
}
@@ -31,7 +47,8 @@ const Icon = ({
shape,
ariaLabel,
"data-cy": dataCy,
- block
+ block,
+ className
}: IconProps) => {
const svgColor = color || "currentColor";
const iconSize = iconSizes[size];
@@ -44,7 +61,7 @@ const Icon = ({
viewBox={`0 0 ${parseInt(iconSize, 10)} ${parseInt(iconSize, 10)}`}
role="img"
aria-label={ariaLabel || `${shape} icon`}
- className={cx(icon, tintSVG(svgColor), block ? blockIcon : "")}
+ className={cx(icon, tintSVG(svgColor), block ? blockIcon : "", className)}
data-cy={["icon", dataCy].filter(Boolean).join(" ")}
>
diff --git a/packages/inlineBorderedItems/components/InlineBorderedItems.tsx b/packages/inlineBorderedItems/components/InlineBorderedItems.tsx
index 56bb30a90..ad156ffe0 100644
--- a/packages/inlineBorderedItems/components/InlineBorderedItems.tsx
+++ b/packages/inlineBorderedItems/components/InlineBorderedItems.tsx
@@ -1,4 +1,5 @@
import * as React from "react";
+import { cx } from "@emotion/css";
import { SpaceSize } from "../../shared/styles/styleUtils/modifiers/modifierUtils";
import { inlineBorderedItems } from "../style";
@@ -6,14 +7,21 @@ export interface InlineBorderedItemsProps {
children:
| Array
>
| React.ReactElement;
+ /**
+ * Allows custom styling
+ */
+ className?: string;
gutterSize?: SpaceSize;
}
const InlineBorderedItems = ({
children,
+ className,
gutterSize = "s"
}: InlineBorderedItemsProps) => (
- {children}
+
+ {children}
+
);
export default InlineBorderedItems;