From 2d8d8b5e698f7955c14cd37acbe990c6354aec63 Mon Sep 17 00:00:00 2001 From: Radek Podrazky Date: Tue, 26 Nov 2024 11:02:55 +0100 Subject: [PATCH] fix(IconWrapper): allow passing additional props Closes UXD-1667 --- src/components/IconWrapper/IconWrapper.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/components/IconWrapper/IconWrapper.tsx b/src/components/IconWrapper/IconWrapper.tsx index bbc67d062..00f28d96f 100644 --- a/src/components/IconWrapper/IconWrapper.tsx +++ b/src/components/IconWrapper/IconWrapper.tsx @@ -1,4 +1,5 @@ import styled, { FlattenSimpleInterpolation, css } from 'styled-components'; +import { ComponentPropsWithoutRef } from 'react'; import { getRadii } from '../../utils'; import Icon from '../Icon/Icon'; @@ -18,13 +19,13 @@ const variances: Record< FlattenSimpleInterpolation > = { default: css` - box-shadow: inset 0 0 0 1px var(--slate-a6); + box-shadow: inset 0 0 0 1px var(--sscds-color-neutral-alpha-6); `, strong: css` background-color: var(--sscds-color-info-100); `, subtle: css` - background-color: var(--slate-a3); + background-color: var(--sscds-color-neutral-alpha-3); `, }; @@ -44,7 +45,11 @@ export default function IconWrapper({ size = 'md', variant = 'default', ...rest -}: IconWrapperProps) { +}: IconWrapperProps & + Omit< + ComponentPropsWithoutRef, + 'color' | 'size' | 'hasFixedSize' | 'hasFixedWidth' | 'name' | 'type' + >) { return (