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

UAlert: UI Alignment problem when using only the props 'description' #1408

Closed
XStarlink opened this issue Feb 23, 2024 · 1 comment · May be fixed by SamandarTemirxodjayev/goshtbor#26, SamandarTemirxodjayev/goshtbor#28 or SamandarTemirxodjayev/goshtbor#29
Labels
bug Something isn't working

Comments

@XStarlink
Copy link

XStarlink commented Feb 23, 2024

Environment

  • @nuxt/ui-pro: "^1.0.1"

Version

v2.14.1

Reproduction

<UAlert
  :description="Vos clés API sont stockées localement dans votre navigateur."
  :color="violet"
  variant="subtle"
  icon="i-lucide-info"
 />

Description

Hello, when using only the props description of an alert (to write something in font-normal) there is still a "mt-1" applied even if there is no title. It's a detail, but it breaks the alignment of the UI.

To prevent this problem, we could apply gap-1 on the parent div of title and description, or test if the title is set to apply the mt-1.

Thanks for this super lib, it's really great.

Capture d’écran 2024-02-23 à 19 17 45 Capture d’écran 2024-02-23 à 19 13 15

Additional context

No response

Logs

No response

@XStarlink XStarlink added the bug Something isn't working label Feb 23, 2024
@XStarlink
Copy link
Author

Edit

Even if we correct the mt-1 to mt-0, there's still an alignment problem:

Capture d’écran 2024-02-23 à 19 50 31

My actual fix

To fix the problem I converted the inner div to flex-col and made it align itself in center, tested with actions and other props and all looks good.

<UAlert
  :ui="{
    inner: 'flex flex-col self-center',
    description: 'mt-0'
  }"
  :description="Vos clés API sont stockées localement dans votre navigateur."
  :color="violet"
  variant="subtle"
  icon="i-lucide-info"
 />

@XStarlink XStarlink changed the title Alert: UI Alignment problem when using only the props 'description' UAlert: UI Alignment problem when using only the props 'description' Feb 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant