-
Notifications
You must be signed in to change notification settings - Fork 55
feat(Input): inline text - adding inline prop for Input component #120
Conversation
Codecov Report
@@ Coverage Diff @@
## master #120 +/- ##
=======================================
Coverage 91.15% 91.15%
=======================================
Files 59 59
Lines 1018 1018
Branches 159 140 -19
=======================================
Hits 928 928
Misses 86 86
Partials 4 4
Continue to review full report at Codecov.
|
bde3e74
to
c103c32
Compare
do we see these prioperties being implemented as part of the Also, with this approach there is another question that arises: why we assume that labels will be placed horizontally in regards to I assume that a way to achieve this look is to use something like the following: <Input ... label=' ..' labelPosition='start' styles={{ label: () => { display: 'block' } }} This approach seems to be inconsistent with those that are about positioning label horizontally. |
Agree, this should be part of the Form abstraction. I would propose a If we implement this on a component by component basis, then we'll need to duplicate it for every form control component (TextArea, Dropdown, etc). |
TL;DR in that case we should pay serious attention to things that are provided as @levithomason, got your point on that - however, lets consider this particular case: Here the problem that I might see relates to accessibility. What will the HTML rendered from this <div ...>
<label ... >Your name</label>
<input type='text' placeholder='...' />
</div> However, instead of |
It is worth noting that the SUIR Label in an Input is not intended as the same HTML label, such as in a Form field. It is actually the combination of the Label component with the Input component, which usually has no relation to describing the input itself. Examples, each of these Inputs has a Label component on one side or the other. You can easily imagine a proper form field label above each one, which would be a separate concern: For accessibility purposes none of these label "attachments" (if I can call it that) seem to be the "form field label" to me. I can image a proper HTML |
c103c32
to
906e04a
Compare
Removing the approach with label. This will be further discussed and agreed on as part of Form Field implementation. |
0800042
to
dbd6e67
Compare
Input Inline Text
Adding inline property to Input component to make possible the inline text addition.
TODO
API Proposal
inline
The input can be added inline with the text.