How to use the mobx-react.PropTypes.observableMap function in mobx-react

To help you get started, we’ve selected a few mobx-react examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github zooniverse / front-end-monorepo / packages / lib-classifier / src / components / Classifier / components / FieldGuide / components / FieldGuide / components / FieldGuideItem / FieldGuideItem.js View on Github external
)
  }
}

FieldGuideItem.defaultProps = {
  className: '',
  icons: observable.map()
}

FieldGuideItem.propTypes = {
  className: PropTypes.string,
  icons: MobXPropTypes.observableMap,
  item: PropTypes.object.isRequired,
  setActiveItemIndex: PropTypes.func.isRequired
}

@inject(storeMapper)
@withTheme
@observer
class DecoratedFieldGuideItem extends FieldGuideItem { }

export default DecoratedFieldGuideItem
export { FieldGuideItem }
github zooniverse / front-end-monorepo / packages / lib-classifier / src / plugins / tasks / DataVisAnnotationTask / components / DataVisAnnotationTask.js View on Github external
type='radio'
            />
          )
        })}
      
    )
  }
}

DataVisAnnotationTask.wrappedComponent.defaultProps = {
  annotations: observable.map(),
  task: {}
}

DataVisAnnotationTask.wrappedComponent.propTypes = {
  annotations: MobXPropTypes.observableMap,
  task: PropTypes.shape({
    help: PropTypes.string,
    instruction: PropTypes.string,
    required: PropTypes.bool
  })
}

export default DataVisAnnotationTask
github zooniverse / front-end-monorepo / packages / lib-classifier / src / components / Classifier / components / FieldGuide / components / FieldGuide / components / FieldGuideItems / FieldGuideItemAnchor.js View on Github external
/>
    )
  }
}

FieldGuideItemAnchor.wrappedComponent.defaultProps = {
  className: '',
  icons: observable.map(),
  theme: {
    dark: false
  }
}

FieldGuideItemAnchor.wrappedComponent.propTypes = {
  className: PropTypes.string,
  icons: MobXPropTypes.observableMap,
  item: PropTypes.object.isRequired,
  setActiveItemIndex: PropTypes.func.isRequired,
  theme: PropTypes.shape({
    dark: PropTypes.bool
  })
}

export default withTheme(FieldGuideItemAnchor)
export { FieldGuideItemAnchor }
github zooniverse / front-end-monorepo / packages / lib-classifier / src / components / Classifier / components / TaskArea / components / Tasks / components / TaskNavButtons / TaskNavButtonsContainer.js View on Github external
onSubmit={this.onSubmit.bind(this)}
      />
    )
  }
}

TaskNavButtonsContainer.wrappedComponent.defaultProps = {
  completeClassification: () => {},
  disabled: false,
  selectStep: () => {},
  tasks: []
}

TaskNavButtonsContainer.wrappedComponent.propTypes = {
  classification: PropTypes.shape({
    annotations: MobXPropTypes.observableMap
  }),
  completeClassification: PropTypes.func,
  disabled: PropTypes.bool,
  showBackButton: PropTypes.bool,
  showNextButton: PropTypes.bool,
  selectStep: PropTypes.func,
  tasks: PropTypes.arrayOf(PropTypes.object)
}

export default TaskNavButtonsContainer
github zooniverse / front-end-monorepo / packages / lib-classifier / src / plugins / tasks / DrawingTask / components / DrawingTask.js View on Github external
type='radio'
            />
          )
        })}
      
    )
  }
}

DrawingTask.defaultProps = {
  annotations: observable.map(),
  task: {}
}

DrawingTask.propTypes = {
  annotations: MobXPropTypes.observableMap,
  task: PropTypes.shape({
    help: PropTypes.string,
    instruction: PropTypes.string,
    required: PropTypes.bool
  })
}

export default DrawingTask