We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 08b5510 commit 00483eaCopy full SHA for 00483ea
packages/core/src/blocks/FileBlockContent/fileBlockHelpers.ts
@@ -108,6 +108,13 @@ export const createFileAndCaptionWrapper = (
108
caption.className = "bn-file-caption";
109
caption.textContent = block.props.caption;
110
111
+ if (typeof block.props.previewWidth === "number" &&
112
+ block.props.previewWidth > 0 &&
113
+ block.props.caption !== undefined
114
+ ) {
115
+ caption.style.width = `${block.props.previewWidth}px`
116
+ }
117
+
118
fileAndCaptionWrapper.appendChild(file);
119
fileAndCaptionWrapper.appendChild(caption);
120
0 commit comments