Skip to content
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

Support valid feedback messages. #840

Merged
merged 2 commits into from
Feb 15, 2018

Conversation

seberik
Copy link
Contributor

@seberik seberik commented Feb 15, 2018

Bootstrap supports form-validation success feedback messages: https://getbootstrap.com/docs/4.0/components/forms/

I added the possibility to provide a valid prop to the render method to add the .feedback-valid class instead of .feedback-invalid. It might be nicer if we would instead explicitly specify invalid or valid={false} but that would break the current behaviour. Any thoughts?

tag: Tag,
...attributes
} = props;

const classes = mapToCssModules(classNames(
className,
'invalid-feedback'
!valid && 'invalid-feedback',
Copy link
Member

@TheSharpieOne TheSharpieOne Feb 15, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make this one line:

valid ? 'valid-feedback' : 'invalid-feedback'

or even something like

${valid ? '' : 'in'}valid-feedback

Copy link
Member

@TheSharpieOne TheSharpieOne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@TheSharpieOne TheSharpieOne merged commit 9b49091 into reactstrap:master Feb 15, 2018
@iKonrad
Copy link
Contributor

iKonrad commented Feb 16, 2018

Hi, when would this get updated in npm?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants