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

[TextInput] Invalid indicator out of TextInput when using marginBottom #9150

Closed
1 task done
lamualfa opened this issue Jul 9, 2021 · 3 comments
Closed
1 task done

Comments

@lamualfa
Copy link

lamualfa commented Jul 9, 2021

What package(s) are you using?

  • carbon-components-react

Detailed description

The Invalid Indicator of TextInput component will out of the TextInput when marginBottom was set.

Why i use marginBottom to give a gap between two form?

I don't know. I just follow Carbon React Storybook Sample. This is the link.

Steps to reproduce the issue

  1. Create a TextInput component.
  2. Set the invalid & invalidText props of TextInput component.
  3. Add marginBottom to TextInput component.

React:

https://codesandbox.io/s/wispy-rain-hdpfu?file=/index.js

Additional information

  • Screenshots or code

image

@tw15egan
Copy link
Member

tw15egan commented Jul 9, 2021

Hey there @lamualfa, it seems like you can avoid this issue by adding the marginBottom to the wrapper div, as opposed to the TextInput itself. Hope that helps!

@lamualfa
Copy link
Author

lamualfa commented Jul 9, 2021

Hey there @lamualfa, it seems like you can avoid this issue by adding the marginBottom to the wrapper div, as opposed to the TextInput itself. Hope that helps!

Absolutely yes. I think in future, the use of marginBottom in Storybook Example must be replaced with the use of marginBottom in wrapper.

@tw15egan
Copy link
Member

tw15egan commented Jul 9, 2021

Agreed, I will make a PR and update this. Thanks for catching it!

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

No branches or pull requests

2 participants