import {forwardRef} from 'react'; import {useTheme} from '@emotion/react'; import {Aliases, Color, IconSize} from 'sentry/utils/theme'; export interface SVGIconProps extends React.SVGAttributes { className?: string; color?: Color | keyof Aliases; /** * DO NOT USE THIS! Please use the `size` prop * * @deprecated */ legacySize?: string; size?: IconSize; } export const SvgIcon = forwardRef(function SvgIcon( { color: providedColor = 'currentColor', size: providedSize = 'sm', legacySize, viewBox = '0 0 16 16', ...props }, ref ) { const theme = useTheme(); const color = theme[providedColor] ?? providedColor; const size = legacySize ?? theme.iconSizes[providedSize]; return ( ); });