Learn more  » Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

skava / @skava/ui   js

Repository URL to install this package:

Version: 4.2.0-a11y.0 

/ src / components / molecules / BackgroundMedia / BackgroundMedia.tsx

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