Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/ui / src / components / molecules / BackgroundMedia / renderProps.tsx
Size: Mime:
import * as React from 'react'
import { BackgroundMediaAndImageAndVideoProps as AllProps } from './typings'
import { StyledBackgroundImage, StyledBackgroundVideo } from './styled'

export function renderImageOrVideo(props: AllProps) {
  if (props.alt && props.src) {
    return <StyledBackgroundImage src={props.src} alt={props.alt} />
  } else {
    return <StyledBackgroundVideo {...props} />
  }
}