diff --git a/packages/icons-sprite/src/SvgIconRootV2.tsx b/packages/icons-sprite/src/SvgIconRootV2.tsx index a0c6cd988..666757af0 100644 --- a/packages/icons-sprite/src/SvgIconRootV2.tsx +++ b/packages/icons-sprite/src/SvgIconRootV2.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { SvgIconProps, SvgIconRoot } from './SvgIconRoot'; +import { type SvgIconProps } from './SvgIconRoot'; interface SvgIconRootV2Props extends SvgIconProps { vkuiIconId: string; @@ -11,33 +11,51 @@ interface SvgIconRootV2Props extends SvgIconProps { export function SvgIconRootV2({ vkuiIconId, vkuiAttrs, - children, vkuiProps, - width: widthProp, - height: heightProp, - viewBox: viewBoxProp, - ...restProps + children: vkuiChildren, + ...iconProps }: SvgIconRootV2Props) { const { - width: widthByUser, - height: heightByUser, - viewBox: viewBoxByUser, - ...restVkuiProps - } = vkuiProps; + width = 0, + height = 0, + display = 'block', + 'aria-hidden': ariaHidden = true, + className, + getRootRef, + style, + title, + children, + ...restProps + } = { + ...iconProps, + ...vkuiProps, + }; + + const size = Math.max(width, height); return ( - - {vkuiProps.children} + {title && {title}} {children} - + {vkuiChildren} + ); }