slupjs / slup

🚀 Sets of Material Design components built upon Inferno
MIT License
13 stars 2 forks source link

Support label prop on Input controls #19

Closed lucat1 closed 7 years ago

lucat1 commented 7 years ago

As in HTML, you can provide a <label> for an input component, in the @slup/controls package should enable the users to provide a label/description prop. This prop should generate a Label alongside the control component that should fire linked input as a normal click would.

Example:

<Checkbox label='Whatever' />

The user should be able to define the direction of this element by supplying the labeld(which stands for direction) prop.

Gejsi commented 7 years ago

Instead of using two props as you said I'd rather use one single prop. This is how you suggested doing

<Checkbox labeld={right} label='Whatever' />

This is how I suggest doing

<Checkbox rightLabel='Whatever' />

I think the second example is much more intuitive than the first one

lucat1 commented 7 years ago

It has been done in #35, closing off