From 1861cc24e7dd2d87488d14961bf5ae1686dd9a80 Mon Sep 17 00:00:00 2001
From: mungodewar <89925955+mungodewar@users.noreply.github.com>
Date: Mon, 13 May 2024 09:36:17 +0100
Subject: [PATCH] [LOOM-1310][BpkRating]: correct letter-spacing in bpk rating
(#3433)
* BpkRating to TS and remove className usage on BpkText
* fixup styling
* remove old snap
* fix bpk-rating
---
.../bpk-component-rating/src/BpkRating.tsx | 20 ++-
.../src/__snapshots__/BpkRating-test.tsx.snap | 140 +++++++++---------
2 files changed, 79 insertions(+), 81 deletions(-)
diff --git a/packages/bpk-component-rating/src/BpkRating.tsx b/packages/bpk-component-rating/src/BpkRating.tsx
index 1fa61a1121..db7b87792e 100644
--- a/packages/bpk-component-rating/src/BpkRating.tsx
+++ b/packages/bpk-component-rating/src/BpkRating.tsx
@@ -120,18 +120,16 @@ const BpkRating = (props: Props) => {
aria-hidden="true"
>
{adjustedValue}
-
- {showScale && (
-
- /{maxValue}
-
- )}
-
+ {showScale && (
+
+ /{maxValue}
+
+ )}
diff --git a/packages/bpk-component-rating/src/__snapshots__/BpkRating-test.tsx.snap b/packages/bpk-component-rating/src/__snapshots__/BpkRating-test.tsx.snap
index 59aaeedbfe..f592224131 100644
--- a/packages/bpk-component-rating/src/__snapshots__/BpkRating-test.tsx.snap
+++ b/packages/bpk-component-rating/src/__snapshots__/BpkRating-test.tsx.snap
@@ -15,15 +15,15 @@ exports[`BpkRating should correctly handling values higher than 5 when rating sc
class="bpk-text bpk-text--label-1"
>
5
+
+
-
- /5
-
+ /5
@@ -70,15 +70,15 @@ exports[`BpkRating should correctly handling values higher than 10 when rating s
class="bpk-text bpk-text--label-1"
>
10
+
+
-
- /10
-
+ /10
@@ -125,15 +125,15 @@ exports[`BpkRating should correctly handling values lower than 0 1`] = `
class="bpk-text bpk-text--label-1"
>
0
+
+
-
- /5
-
+ /5
@@ -180,15 +180,15 @@ exports[`BpkRating should correctly when value is string type 1`] = `
class="bpk-text bpk-text--label-1"
>
4,6
+
+
-
- /5
-
+ /5
@@ -280,15 +280,15 @@ exports[`BpkRating should render correctly 1`] = `
class="bpk-text bpk-text--label-1"
>
4.6
+
+
-
- /5
-
+ /5
@@ -335,15 +335,15 @@ exports[`BpkRating should render large size correctly 1`] = `
class="bpk-text bpk-text--hero-5"
>
4.6
+
+
-
- /5
-
+ /5
@@ -390,15 +390,15 @@ exports[`BpkRating should render large title only correctly 1`] = `
class="bpk-text bpk-text--hero-5"
>
5
+
+
-
- /5
-
+ /5
@@ -435,15 +435,15 @@ exports[`BpkRating should render showScale rating correctly 1`] = `
class="bpk-text bpk-text--label-1"
>
5
+
+
-
- /5
-
+ /5
@@ -490,15 +490,15 @@ exports[`BpkRating should render title only correctly 1`] = `
class="bpk-text bpk-text--label-1"
>
5
+
+
-
- /5
-
+ /5
@@ -535,15 +535,15 @@ exports[`BpkRating should render zero to ten scale rating correctly 1`] = `
class="bpk-text bpk-text--label-1"
>
8.2
+
+
-
- /10
-
+ /10