Skip to content

Commit

Permalink
fix(IconWrapper): allow passing additional props
Browse files Browse the repository at this point in the history
Closes UXD-1667
  • Loading branch information
ajkl2533 committed Nov 26, 2024
1 parent 516c755 commit 2d8d8b5
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/components/IconWrapper/IconWrapper.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import styled, { FlattenSimpleInterpolation, css } from 'styled-components';
import { ComponentPropsWithoutRef } from 'react';

import { getRadii } from '../../utils';
import Icon from '../Icon/Icon';
Expand All @@ -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);
`,
};

Expand All @@ -44,7 +45,11 @@ export default function IconWrapper({
size = 'md',
variant = 'default',
...rest
}: IconWrapperProps) {
}: IconWrapperProps &
Omit<
ComponentPropsWithoutRef<typeof Icon>,
'color' | 'size' | 'hasFixedSize' | 'hasFixedWidth' | 'name' | 'type'
>) {
return (
<IconWrapperRoot
$size={size}
Expand Down

0 comments on commit 2d8d8b5

Please sign in to comment.