2.0.4 • Published 5 years ago

the-microphone v2.0.4

Weekly downloads
8
License
MIT
Repository
github
Last release
5 years ago

the-microphone

Build Status npm Version JS Standard

Audio input of the-components

Installation

$ npm install the-microphone --save

Usage

'use strict'

import React from 'react'
import { TheMicrophone, TheMicrophoneStyle } from 'the-microphone'
import { TheIconStyle } from 'the-icon'

class ExampleComponent extends React.Component {
  constructor (props) {
    super(props)
    this.micRef = React.createRef()
    this.state = {running: false}
  }

  render () {
    return (
      <div>
        <TheMicrophoneStyle/>
        <TheIconStyle/>
        <TheMicrophone onClick={() => this.setState({running: !this.state.running})}
                       running={this.state.running}
                       ref={this.micRef}
        />
      </div>

    )
  }

  componentDidMount () {
  }
}

export default ExampleComponent

Components

TheMicrophone

Audio input of the-components

Props

NameTypeDescriptionDefault
heightunionHeight of mic92
runningboolRunning or notfalse
widthunionWidth of mic92

TheMicrophoneStyle

Style for TheMicrophone

Props

NameTypeDescriptionDefault
optionsobjectStyle options{}

License

This software is released under the MIT License.

Links