henrikruscon / hyper-statusline

Status Line Plugin for Hyper
MIT License
387 stars 79 forks source link

decorateHyper should pass through custom children #44

Closed mgrip closed 7 years ago

mgrip commented 7 years ago

From the hyper docs:

We encourage you to maintain compatibility with other decorators. Since many can be set, don't assume that yours is the only one. For example, if you're passing children, compose potential existing values:

render () {
  const customChildren = Array.from(this.props.customChildren)
    .concat(<p>My new child</p>);
  return <Tab {...this.props} customChildren={customChildren} />
}

It looks like the decorateHyper function currently overrides this.props.customChildren rather than appending to it.