import {forwardRef, useMemo} from 'react'; import {keyframes, useTheme} from '@emotion/react'; import styled from '@emotion/styled'; import {uniqueId} from 'sentry/utils/guid'; import {SvgIcon, SVGIconProps} from './svgIcon'; type WrappedProps = { forwardedRef: React.Ref; } & Props; function IconBusinessComponent({ gradient = false, withShine = false, forwardedRef, ...props }: WrappedProps) { const theme = useTheme(); const uid = useMemo(() => uniqueId(), []); const maskId = `icon-business-mask-${uid}`; const gradientId = `icon-business-gradient-${uid}`; const shineId = `icon-business-shine-${uid}`; return ( {withShine && ( )} ); } interface Props extends SVGIconProps { /** * Renders a pink purple gradient on the icon */ gradient?: boolean; /** * Adds an animated shine to the icon */ withShine?: boolean; } const IconBusiness = forwardRef((props, ref) => ( )); IconBusiness.displayName = 'IconBusiness'; const shine = keyframes` 0% { transform: translateX(-100%); } 94% { transform: translateX(-100%); } 100% { transform: translateX(100%); } `; const ShineRect = styled('rect')` transform: translateX(-100%); animation: ${shine} 8s ease-in-out infinite; `; export {IconBusiness};