From 1ff607f9b57ab41d16528c1933e8d6b12f81541f Mon Sep 17 00:00:00 2001 From: Jamie Henson Date: Thu, 19 Sep 2024 14:58:28 +0100 Subject: [PATCH 1/2] chore: add more customisation props to EncapsulatedIcon --- src/core/Icon/EncapsulatedIcon.tsx | 11 +++++++-- .../Icon/__snapshots__/Icon.stories.tsx.snap | 24 +++++++++---------- .../ProductTile.stories.tsx.snap | 22 ++++++++--------- 3 files changed, 32 insertions(+), 25 deletions(-) diff --git a/src/core/Icon/EncapsulatedIcon.tsx b/src/core/Icon/EncapsulatedIcon.tsx index 709ab217..c2ae698f 100644 --- a/src/core/Icon/EncapsulatedIcon.tsx +++ b/src/core/Icon/EncapsulatedIcon.tsx @@ -6,16 +6,23 @@ import { ColorClass, Theme } from "../styles/colors/types"; type EncapsulatedIconProps = { theme?: Theme; className?: string; + innerClassName?: string; + iconSize?: string; } & IconProps; const EncapsulatedIcon = ({ theme = "dark", size = "40px", + iconSize, className, + innerClassName, ...iconProps }: EncapsulatedIconProps) => { const t = (color: ColorClass) => determineThemeColor("dark", theme, color); const numericalSize = parseInt(size, 10); + const numericalIconSize = iconSize + ? parseInt(iconSize, 10) + : numericalSize - 12; return (
- +
); diff --git a/src/core/Icon/__snapshots__/Icon.stories.tsx.snap b/src/core/Icon/__snapshots__/Icon.stories.tsx.snap index 797b5639..0f120ecc 100644 --- a/src/core/Icon/__snapshots__/Icon.stories.tsx.snap +++ b/src/core/Icon/__snapshots__/Icon.stories.tsx.snap @@ -11,7 +11,7 @@ exports[`JS Components/Icon DarkEncapsulatedIcons smoke-test 1`] = `
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Date: Thu, 19 Sep 2024 14:59:40 +0100 Subject: [PATCH 2/2] chore: bump to 14.6.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 46654207..601bbc68 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ably/ui", - "version": "14.6.0-dev.fd4036a", + "version": "14.6.1", "description": "Home of the Ably design system library ([design.ably.com](https://design.ably.com)). It provides a showcase, development/test environment and a publishing pipeline for different distributables.", "repository": { "type": "git",