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

[BUG] - DateInput problems displaying long descriptions #3515

Open
rettimo opened this issue Jul 19, 2024 · 5 comments
Open

[BUG] - DateInput problems displaying long descriptions #3515

rettimo opened this issue Jul 19, 2024 · 5 comments

Comments

@rettimo
Copy link

rettimo commented Jul 19, 2024

NextUI Version

2.4.5

Describe the bug

The approach to separating input and help text was chosen incorrectly. Since it is fixed and does not react to overflow. Thus, help text that has two or more lines will be displayed under the bottom block.

In fact, all inputs with label have the same problem (margin top problem)

image

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

  1. Use DateInput with the long description (two or more lines)
  2. Expect problems displaying long descriptions

Expected behavior

The help text has its own styles to separate from the main block. How this is done in the Input component.

Input:

image

Screenshots or Videos

No response

Operating System Version

macOs Sonoma 14.5

Browser

Chrome

Copy link

linear bot commented Jul 19, 2024

@awesome-pro
Copy link
Contributor

@rettimo can you explain more about what you want
it seems fine to me
Screenshot 2024-07-26 at 5 41 15 PM

@rettimo
Copy link
Author

rettimo commented Jul 29, 2024

If the input width is small and the description text is longer than one line, you will be able to see a bug. For example, if the description takes up 2-3 lines, and there is another element under this input, the description will overlap the bottom block.
I also show an example of this behavior:

image

@awesome-pro
Copy link
Contributor

awesome-pro commented Jul 29, 2024

@rettimo I tried even with gap-0 in div, but things look fine to me
Kindly provide reproducible environment, it will be better

<div>
      <DateInput
        {...args}
        description="Please enter your birth date Lorem ipsum dolor sit amet consectetur, adipisicing elit. Quidem beatae libero sint quisquam quasi eos? Animi eum libero labore. Optio. Please enter your birth date Lorem ipsum dolor sit amet consectetur, adipisicing elit. Quidem beatae libero sint quisquam quasi eos? Animi eum libero labore. Optio."
        name="date"
      />
      <h1>
        Please enter your birth date Lorem ipsum dolor sit amet consectetur, adipisicing elit.
        Quidem beatae libero sint quisquam quasi eos? Animi eum liber
      </h1>
      <button className={button({className: "max-w-fit"})} type="submit">
        Submit
      </button>
    </div>
Screenshot 2024-07-29 at 4 22 16 PM

@rettimo
Copy link
Author

rettimo commented Jul 31, 2024

Code example

image

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

No branches or pull requests

2 participants