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

Star rating #1976

Closed
Ahmed-Assaf opened this issue Jul 22, 2024 · 4 comments
Closed

Star rating #1976

Ahmed-Assaf opened this issue Jul 22, 2024 · 4 comments
Labels
duplicate This issue or pull request already exists

Comments

@Ahmed-Assaf
Copy link

Ahmed-Assaf commented Jul 22, 2024

Description

we need star rating component to put products rating in the site

Additional context

image

Tasks

No tasks being tracked yet.
@noook
Copy link
Collaborator

noook commented Jul 22, 2024

I believe this is something easily achievable in your own codebase, and not really relevant to add to Nuxt UI.

Copy link
Member

Duplicate #505. A PR was made back then (#513) but never took the time to review it 😬

@benjamincanac benjamincanac added duplicate This issue or pull request already exists and removed triage labels Jul 22, 2024 — with Volta.net
@benjamincanac benjamincanac closed this as not planned Won't fix, can't repro, duplicate, stale Jul 22, 2024
@noook
Copy link
Collaborator

noook commented Jul 22, 2024

Please check this playground: https://stackblitz.com/edit/nuxt-ui-njem3p?file=components/StarRating.vue

<template>
  <div class="space-x-1">
    <UIcon
      v-for="i in rating"
      :key="i"
      name="i-heroicons-star-20-solid"
      class="text-yellow-500"
    />
    <UIcon v-for="i in 5 - rating" :key="i" name="i-heroicons-star" />
  </div>
</template>

<script setup lang="ts">
const props = defineProps<{
  rating: number;
}>();
</script>
<StarRating :rating="4" />
image

@benjamincanac
Copy link
Member

@noook What do you think of #513? Should we close it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants