-
-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added showInlineError to bootstrap theme #84
Conversation
If true, we could include the error message as a text block with the input form. This seems like a very useful option, especially for forms where the errors are not rendered.
Yes, inline errors are useful. |
@@ -41,11 +42,13 @@ const FormGroup = ({ | |||
<section className={classnames(wrapClassName, gridClassName(grid, 'input'))}> | |||
{children} | |||
{makeHelp(help, helpClassName)} | |||
{error && showError ? makeHelp(error, 'text-help') : ''} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why makeHelp(error, ...)
and not errorMessage
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It needs to be wrapped in <span.text-help>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I get it, but error
is an object, not a String
- errorMessage
is a String
.
Two more things: how about renaming it to Could you also implement it for bootstrap-3? |
Sure - I was just making sure you were on-board... I'll whip it up |
showError
BooleanshowInlineError
Boolean
@radekmie ok - bootstrap 3 & 4 are implemented, |
Great! |
showInlineError
Boolean
If true, we could include the error message as a text block with the input form.
This seems like a very useful option,
especially for forms where the errors are not rendered.