import * as React from 'react'; import {keyframes, useTheme} from '@emotion/react'; import styled from '@emotion/styled'; import {uniqueId} from 'app/utils/guid'; import SvgIcon from './svgIcon'; type WrappedProps = { forwardRef: React.Ref; } & Props; function IconBusinessComponent({ gradient = false, withShine = false, forwardRef, ...props }: WrappedProps) { const theme = useTheme(); const uid = React.useMemo(() => uniqueId(), []); const maskId = `icon-business-mask-${uid}`; const gradientId = `icon-business-gradient-${uid}`; const shineId = `icon-business-shine-${uid}`; return ( {withShine && ( )} ); } type Props = { /** * Renders a pink purple gradient on the icon */ gradient?: boolean; /** * Adds an animated shine to the icon */ withShine?: boolean; } & React.ComponentProps; const IconBusiness = React.forwardRef((props: Props, ref: React.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};