summaryrefslogtreecommitdiff
path: root/ext/js/display/sandbox
diff options
context:
space:
mode:
authorStephen Kraus <8003332+stephenmk@users.noreply.github.com>2024-01-27 03:12:29 -0600
committerGitHub <noreply@github.com>2024-01-27 09:12:29 +0000
commit1c258f7207faad0c1489fb24fb31694e32064914 (patch)
tree5e00732b76f7d13572fa7a103d72e3b4cf25db7b /ext/js/display/sandbox
parent3c76b878e9ddcc8fa52d00fc85f561bbb72c5dd1 (diff)
Add border styling options for structured content images (#577)
* Add border styling options for structured content images * Replace border style, width, and color properties with shorthand --------- Co-authored-by: stephenmk <stephenmk@users.noreply.github.com>
Diffstat (limited to 'ext/js/display/sandbox')
-rw-r--r--ext/js/display/sandbox/structured-content-generator.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/js/display/sandbox/structured-content-generator.js b/ext/js/display/sandbox/structured-content-generator.js
index f73d790a..ee86a7f4 100644
--- a/ext/js/display/sandbox/structured-content-generator.js
+++ b/ext/js/display/sandbox/structured-content-generator.js
@@ -73,6 +73,8 @@ export class StructuredContentGenerator {
collapsed,
collapsible,
verticalAlign,
+ border,
+ borderRadius,
sizeUnits
} = data;
@@ -130,6 +132,8 @@ export class StructuredContentGenerator {
}
imageContainer.style.width = `${usedWidth}em`;
+ if (typeof border === 'string') { imageContainer.style.border = border; }
+ if (typeof borderRadius === 'string') { imageContainer.style.borderRadius = borderRadius; }
if (typeof title === 'string') {
imageContainer.title = title;
}