From 79a0ea960270c02e0525fe927b523464c8a02e91 Mon Sep 17 00:00:00 2001 From: Philip Molares Date: Sat, 6 Nov 2021 11:54:40 +0100 Subject: [PATCH] feat: add a target description to OneClickEmbedding Signed-off-by: Philip Molares Co-authored-by: Tilman Vatteroth --- locales/en.json | 3 +++ .../asciinema/asciinema-frame.tsx | 1 + .../replace-components/gist/gist-frame.tsx | 6 ++++- .../one-click-frame/one-click-embedding.tsx | 22 +++++++++---------- .../replace-components/vimeo/vimeo-frame.tsx | 1 + .../youtube/youtube-frame.tsx | 1 + 6 files changed, 22 insertions(+), 12 deletions(-) diff --git a/locales/en.json b/locales/en.json index d7c99e2a1..59975064c 100644 --- a/locales/en.json +++ b/locales/en.json @@ -28,6 +28,9 @@ "png": "Save as PNG", "svg": "Save as SVG", "errorJson": "Error parsing the JSON" + }, + "one-click-embedding": { + "previewHoverText": "Click to load content from {{target}}" } }, "landing": { diff --git a/src/components/markdown-renderer/replace-components/asciinema/asciinema-frame.tsx b/src/components/markdown-renderer/replace-components/asciinema/asciinema-frame.tsx index bf6363df8..6d4939289 100644 --- a/src/components/markdown-renderer/replace-components/asciinema/asciinema-frame.tsx +++ b/src/components/markdown-renderer/replace-components/asciinema/asciinema-frame.tsx @@ -14,6 +14,7 @@ export const AsciinemaFrame: React.FC = ({ id }) => { containerClassName={'embed-responsive embed-responsive-16by9'} previewContainerClassName={'embed-responsive-item'} hoverIcon={'play'} + targetDescription={'asciinema'} loadingImageUrl={`https://asciinema.org/a/${id}.png`}>