From 2931b13d977e86bcd080889f8d9b62a25d14a722 Mon Sep 17 00:00:00 2001 From: Alice Clausen <42611957+alicemacl@users.noreply.github.com> Date: Thu, 26 Sep 2024 13:39:26 +0200 Subject: [PATCH] Fix background image for showing opacity colors (#1277) * Add disabled version to ProgressBar * Revert changes progressbar * merge with main * Move image to support public view * Delete changeset * Remove rudandant condition * Bump package for build --- .../color-tokens/ColorGrid.tsx | 11 ++--------- apps/docs/package.json | 2 +- .../images}/translucent-background.svg | 0 3 files changed, 3 insertions(+), 10 deletions(-) rename apps/docs/{app/routes/_base.resources.design-tokens => public/images}/translucent-background.svg (100%) diff --git a/apps/docs/app/routes/_base.resources.design-tokens/color-tokens/ColorGrid.tsx b/apps/docs/app/routes/_base.resources.design-tokens/color-tokens/ColorGrid.tsx index d2ac0bf2f..b308205aa 100644 --- a/apps/docs/app/routes/_base.resources.design-tokens/color-tokens/ColorGrid.tsx +++ b/apps/docs/app/routes/_base.resources.design-tokens/color-tokens/ColorGrid.tsx @@ -7,7 +7,6 @@ import { Text, } from "@vygruppen/spor-react"; import { useTokenInfo } from "./utils"; -import translucentBackgroundUrl from "../translucent-background.svg"; type ColorGridProps = { colors: { token: string; alias?: string }[]; @@ -93,11 +92,7 @@ export const ColorToken = ({ borderBottomLeftRadius={isVertical ? "sm" : "none"} position="absolute" zIndex={1} - bgGradient={ - isTranslucent - ? `linear(to-r, ${colorValue}, ${colorValue})` - : undefined - } + bgGradient={`linear(to-r, ${colorValue}, ${colorValue})`} backgroundPosition="center center" backgroundRepeat="repeat" /> @@ -108,9 +103,7 @@ export const ColorToken = ({ borderTopRightRadius={!isVertical ? "sm" : "none"} borderBottomLeftRadius={isVertical ? "sm" : "none"} position="absolute" - backgroundImage={ - isTranslucent ? `${translucentBackgroundUrl}` : undefined - } + backgroundImage={`url(/images/translucent-background.svg)`} backgroundPosition="center center" backgroundRepeat="repeat" /> diff --git a/apps/docs/package.json b/apps/docs/package.json index fb12c46e7..4e25544ff 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -1,6 +1,6 @@ { "private": true, - "version": "0.0.50", + "version": "0.0.51", "name": "@vygruppen/docs", "description": "The Spor documentation", "license": "MIT", diff --git a/apps/docs/app/routes/_base.resources.design-tokens/translucent-background.svg b/apps/docs/public/images/translucent-background.svg similarity index 100% rename from apps/docs/app/routes/_base.resources.design-tokens/translucent-background.svg rename to apps/docs/public/images/translucent-background.svg