From f565002c69b2b1c8a4ad0ad0c7b8f0cad3f72bbb Mon Sep 17 00:00:00 2001 From: hirakei1203 Date: Thu, 8 Dec 2022 22:56:10 +0900 Subject: [PATCH] add/make 4 rating examples --- .../rating/examples/RatingCountExample.vue | 18 ++++++ .../rating/examples/RatingExample.vue | 2 +- .../examples/RatingStarSizesExample.vue | 13 +++++ .../rating/examples/RatingWithTextExample.vue | 12 ++++ docs/components/rating/rating.md | 44 ++++++++++++++ src/components/Rating/Rating.vue | 58 ++++++++++++++++--- .../Rating/composables/useRatingClasses.ts | 4 ++ 7 files changed, 142 insertions(+), 9 deletions(-) create mode 100644 docs/components/rating/examples/RatingCountExample.vue create mode 100644 docs/components/rating/examples/RatingStarSizesExample.vue create mode 100644 docs/components/rating/examples/RatingWithTextExample.vue diff --git a/docs/components/rating/examples/RatingCountExample.vue b/docs/components/rating/examples/RatingCountExample.vue new file mode 100644 index 0000000..91d051e --- /dev/null +++ b/docs/components/rating/examples/RatingCountExample.vue @@ -0,0 +1,18 @@ + + diff --git a/docs/components/rating/examples/RatingExample.vue b/docs/components/rating/examples/RatingExample.vue index 7da2976..7eab3d4 100644 --- a/docs/components/rating/examples/RatingExample.vue +++ b/docs/components/rating/examples/RatingExample.vue @@ -1,6 +1,6 @@ diff --git a/docs/components/rating/examples/RatingWithTextExample.vue b/docs/components/rating/examples/RatingWithTextExample.vue new file mode 100644 index 0000000..3636cbe --- /dev/null +++ b/docs/components/rating/examples/RatingWithTextExample.vue @@ -0,0 +1,12 @@ + + diff --git a/docs/components/rating/rating.md b/docs/components/rating/rating.md index 98b3a4c..ce025aa 100644 --- a/docs/components/rating/rating.md +++ b/docs/components/rating/rating.md @@ -1,8 +1,13 @@ # Vue Rating Component - Flowbite +## Default rating +Use this simple example of a star rating component for showing review results. ```vue + +``` + + + +## Rating count +Aggregate more results by using this example to show the amount of reviews and the average score. +```vue + + +``` + + + +## Star sizes +Check out the different sizing options for the star review component from small, medium, and large. +```vue + + +``` + + diff --git a/src/components/Rating/Rating.vue b/src/components/Rating/Rating.vue index 2b707f2..c702f33 100644 --- a/src/components/Rating/Rating.vue +++ b/src/components/Rating/Rating.vue @@ -1,15 +1,33 @@ +