import { action , observable } from 'mobx' ; import AbstractStore from './store' ; class ProgressStore extends AbstractStore { @ observable progress = 1 ; @ observable color = '' ; @ observable name = '' ; @ observable multipler = 1 ; constructor ( ) { super ( ) ; this . init ( ) ; } @ action init = ( ) => { this . progress = 1 ; this . color = '' ; this . name = '' ; } ; @ action updateStatic = ( newName , newColor , multipler = 1 ) => { this . name = newName ; this . color = newColor ; this . multipler = multipler ; } ; @ action updateProgress = ( value ) => { this . progress = value ; } ; } export default new ProgressStore ( ) ;