diff --git a/src/components/atoms/OakImage/OakImage.tsx b/src/components/atoms/OakImage/OakImage.tsx index 2a159c7b..43ba6f0f 100644 --- a/src/components/atoms/OakImage/OakImage.tsx +++ b/src/components/atoms/OakImage/OakImage.tsx @@ -44,7 +44,7 @@ type StyledImageProps = Omit & { $showOakPlaceholder: boolean; }; -const oakPlaceholder = +export const oakPlaceholder = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA2NCA2NCI+PHBhdGggZmlsbD0iIzIyMiIgZD0iTTI4Ljc3OSAxOS4xNzZhMjcuMTkxIDI3LjE5MSAwIDAgMC0zLjggMS42IDE2LjcgMTYuNyAwIDAgMC03LjEgOC40YzAgLjEtLjEuMi0uMS4zLS43IDIuNC0uNiAyIDEuMyAyLjMgMS45LjMgMSAuNSAxIDEuMy0uMSA4LjggNC4xIDE1LjEgMTEuNCAxOS42YTEuNSAxLjUgMCAwIDAgMS43LjJjNS43LTIuNiA5LjMtNyAxMC4zLTEzLjJhMSAxIDAgMCAxIDEtMWwzLS4yYy44IDAgMS4zLjIgMS4yIDEuMmExNy45IDE3LjkgMCAwIDEtMy4yIDkuMiAyMy43IDIzLjcgMCAwIDEtMTAuOSA5LjEgNS40MDEgNS40MDEgMCAwIDEtNC41LS4yIDI2LjI5OCAyNi4yOTggMCAwIDEtOC41LTYuNiAyNS45IDI1LjkgMCAwIDEtNi40LTE0LjRjMC0uNi0uMi0uNy0uOC0uOC0yLjUtLjQtMi41LS4xLTIuMy0yLjlhMTkuMyAxOS4zIDAgMCAxIDEwLjgtMTYuNiAzOC45OTkgMzguOTk5IDAgMCAxIDUuNy0yLjEgMi4xIDIuMSAwIDAgMCAuOS0xLjMgMTQuMSAxNC4xIDAgMCAxIDMuNS02LjNsLjMtLjNjMS45LTIgMi42LTIgNC4zLjJsLjQuNWMxLjEgMS4xIDEgMS41LS4xIDIuNmExMS45IDExLjkgMCAwIDAtMy4yIDQuNCAxNi45IDE2LjkgMCAwIDEgNy41IDIuM2M1LjcgMy41IDkuMiA4LjMgOS45IDE1IC4wMTYuOTAxLS4wMTcgMS44MDItLjEgMi43IDAgLjgtLjYgMS0xLjIgMS4yYTE2LjEgMTYuMSAwIDAgMS0xMS0uNyAxNy45MDEgMTcuOTAxIDAgMCAxLTEwLjktMTMuNiA5Ljc5NiA5Ljc5NiAwIDAgMS0uMS0xLjlabTE4LjEgMTIuMmMuNC01LjUtNi45LTEyLjYtMTMtMTIuMS41IDYuNSA3LjYgMTIuOCAxMyAxMi4xWiIgb3BhY2l0eT0iLjEiLz48L3N2Zz4="; const clickStyles = css<{ onClick?: MouseEventHandler }>` @@ -58,7 +58,7 @@ const clickStyles = css<{ onClick?: MouseEventHandler }>` `} `; -const placeholderStyles = css` +export const placeholderStyles = css` ${(props) => props.$showOakPlaceholder && css` diff --git a/src/components/organisms/shared/OakMediaClip/OakMediaClip.tsx b/src/components/organisms/shared/OakMediaClip/OakMediaClip.tsx index 476922a8..dd1261bc 100644 --- a/src/components/organisms/shared/OakMediaClip/OakMediaClip.tsx +++ b/src/components/organisms/shared/OakMediaClip/OakMediaClip.tsx @@ -10,6 +10,8 @@ import { OakImage, OakP, OakLI, + oakPlaceholder, + placeholderStyles, } from "@/components/atoms"; import { OakCombinedColorToken } from "@/styles"; import { InternalButton } from "@/components/atoms/InternalButton"; @@ -75,6 +77,10 @@ const MediaButtonWrapper = styled(StyledButtonWrapper)` width: 100%; `; +export const StyledMediaClipImage = styled(OakImage)` + ${placeholderStyles} +`; + const ImageBox = styled(OakFlex)<{ disabled?: boolean }>` img { border-radius: 2px; @@ -231,12 +237,13 @@ export const OakMediaClip = ({ $flexShrink={0} > {!isAudioClip && thumbnailImage ? ( - ) : ( diff --git a/src/components/organisms/shared/OakMediaClip/__snapshots__/OakMediaClip.test.tsx.snap b/src/components/organisms/shared/OakMediaClip/__snapshots__/OakMediaClip.test.tsx.snap index 01264eb6..a6f2438d 100644 --- a/src/components/organisms/shared/OakMediaClip/__snapshots__/OakMediaClip.test.tsx.snap +++ b/src/components/organisms/shared/OakMediaClip/__snapshots__/OakMediaClip.test.tsx.snap @@ -34,8 +34,6 @@ exports[`OakMediaClip matches snapshot 1`] = ` .c12 { position: relative; width: 100%; - height: 100%; - border-radius: 0.125rem; font-family: --var(google-font),Lexend,sans-serif; } @@ -266,7 +264,7 @@ exports[`OakMediaClip matches snapshot 1`] = ` className="c9 c10 c11" >
{ @@ -111,13 +119,12 @@ export const OakMediaClipStackListItem = ( $position={"relative"} $mb={["space-between-none", "space-between-none", "space-between-xs"]} > -
alt text for the image
play

Learning cycle 3 videos

5