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

Badge border radius is wrong (NavigationMenu) #2766

Closed
sergiuwaxmann opened this issue Nov 26, 2024 · 1 comment
Closed

Badge border radius is wrong (NavigationMenu) #2766

sergiuwaxmann opened this issue Nov 26, 2024 · 1 comment
Labels
bug Something isn't working v3 #1289

Comments

@sergiuwaxmann
Copy link

Environment

Is this bug related to Nuxt or Vue?

Nuxt

Version

v3.0.0-alpha.9

Reproduction

<script setup lang="ts">
/* Types */
import type { NavigationMenuItem } from "#ui/types";

const items = ref<NavigationMenuItem[][]>([
  [
    {
      label: "Menu",
      defaultOpen: true,
      children: [
        {
          label: "Submenu",
          badge: {
            label: "latest",
            color: "secondary",
          },
          to: "https://www.example.com",
          target: "_blank",
        },
      ],
    },
  ],
]);
</script>

<template>
  <div class="h-full">
    <UNavigationMenu orientation="vertical" :items="items" />
  </div>
</template>

Description

After upgrading from alpha.8 to alpha.9, the border radius is wrong (different from the rest of the application) when using badge in the NavigationMenu. When inspecting HTML, this is the class (related to border radius) applied to the badge: rounded-[calc(var(--ui-radius)].

I also tried passing the class to BadgeProps but it doesn't work:

```vue
<script setup lang="ts">
/* Types */
import type { NavigationMenuItem } from "#ui/types";

const items = ref<NavigationMenuItem[][]>([
  [
    {
      label: "Menu",
      defaultOpen: true,
      children: [
        {
          label: "Submenu",
          badge: {
            label: "latest",
            color: "secondary",
            class: "rounded-full", // ! NOT WORKING
          },
          to: "https://www.example.com",
          target: "_blank",
        },
      ],
    },
  ],
]);
</script>

<template>
  <div class="h-full">
    <UNavigationMenu orientation="vertical" :items="items" />
  </div>
</template>

However, IMO the border radius should be inherited (no need to pass class).

Additional context

No response

Logs

@sergiuwaxmann sergiuwaxmann added bug Something isn't working triage v3 #1289 labels Nov 26, 2024
@sergiuwaxmann sergiuwaxmann changed the title NavigationMenu: badge border radius is wrong Badge border radius is wrong (NavigationMenu) Nov 26, 2024
benjamincanac added a commit that referenced this issue Nov 26, 2024
@benjamincanac benjamincanac removed the triage label Nov 26, 2024 — with Volta.net
Copy link
Member

Thanks for the report 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v3 #1289
Projects
None yet
Development

No branches or pull requests

2 participants