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 / BackgroundMedia.tsx
Size: Mime:
import * as React from 'react'
import {
  BackgroundMediaProps,
  BackgroundMediaAndImageAndVideoProps as AllProps,
} from './typings'
import { BackgroundWrap, LightFade, DarkFade } from './styled'
import { renderImageOrVideo } from './renderProps'

class BackgroundMedia extends React.PureComponent<BackgroundMediaProps> {
  render() {
    const { className, ...props } = this.props as AllProps
    const view = renderImageOrVideo(props)

    return (
      <BackgroundWrap className={className}>
        {view}
        <LightFade />
        <DarkFade />
      </BackgroundWrap>
    )
  }
}

export { BackgroundMedia }
export default BackgroundMedia