ui icon indicating copy to clipboard operation
ui copied to clipboard

Notification description has zero margin top when title is specified

Open u128393 opened this issue 2 years ago • 0 comments

Environment

  • Operating System: Darwin
  • Node Version: v20.9.0
  • Nuxt Version: 3.12.3
  • CLI Version: 3.12.0
  • Nitro Version: 2.9.7
  • Package Manager: [email protected]
  • Builder: -
  • User Config: compatibilityDate, devtools, extends, modules, routeRules
  • Runtime Modules: @nuxt/ui
  • Build Modules: -

Version

v2.17.0

Reproduction

https://stackblitz.com/edit/nuxt-ui-nsyrqf?file=app.vue

Description

Looking at the documentation for the Notification component, I expect the notification.description config can be used to change the margin top of the description (so that there could be more spacing between the title and description). However, the margin top of the description is always 0 (with the mt-0 class).

image

By checking the source code here, it seems that the intention is to add the mt-0 class when there is no title. However, the condition used is !(title && $slots.title) which is false (thus not add the mt-0 class) when both title prop and slot are specified, but usually we should only set one. I guess we'd want to change the condition to !title && !$slots.title?

Additional context

No response

Logs

No response

u128393 avatar Jul 11 '24 14:07 u128393