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 / atoms / Video / Source.tsx
Size: Mime:
import React from 'react'
import { isString } from 'exotic'
import { toType, toSrc } from './deps'
import { SourceProps, SourceType } from './typings'

class Source extends React.PureComponent<SourceProps> {
  static from(props: SourceProps | SourceType, index: number) {
    const attributes = isString(props) ? { src: props } : props
    return <Source key={index} {...attributes} />
  }
  render() {
    const type = toType(this.props)
    const src = toSrc(this.props)
    return <source src={src} type={type} />
  }
}

export { Source }
export default Source