claus / react-dat-gui

React dat.GUI
MIT License
292 stars 56 forks source link

feature request: support title setting #5

Closed marswong closed 6 years ago

marswong commented 6 years ago

it would be perfect if we can set a title of the toolbar, the API could be looked like:

<DatGui title="xxx" />

// or

<DatGui>
  <DatTitle path="xxx" />
</DatGui>

Thank you :)

rohan-deshpande commented 6 years ago

Hmm is this mutable though? If not why not just render a div before DatGui. If it's mutable, you have DatString.

DatFolder is similar to this but provides some UX functionality.

marswong commented 6 years ago

it should be immutable and it's ok to render a div before DatGui, just we need to hard code on that, not so elegant. I think your style design is awesome, so it would be great to support a center aligned title on the top of DatGui children. Thank you :)

rohan-deshpande commented 6 years ago

So I guess you kind of want a DatSection component?

I can kind of see the use but that's also what DatFolder is for...

I'd lean away from putting in controllers that don't control anything, the lib could get too bloated if we start doing that.

marswong commented 6 years ago

yes, maybe at present it's ok to hack on the style of DatFolder. Thank you :)