🎥 Make videos programmatically with React
`@remotion/layout-utils`: Fix docs about `exceedsBox` property
JonnyBurgerbdfdd0fa80ca
diff --git a/packages/docs/docs/layout-utils/fill-text-box.mdx b/packages/docs/docs/layout-utils/fill-text-box.mdxindex a296318c1a..a8354c41d4 100644--- a/packages/docs/docs/layout-utils/fill-text-box.mdx+++ b/packages/docs/docs/layout-utils/fill-text-box.mdx@@ -1,7 +1,7 @@---image: /generated/articles-docs-layout-utils-fill-text-box.pngtitle: fillTextBox()-crumb: "@remotion/layout-utils"+crumb: '@remotion/layout-utils'---# fillTextBox()<AvailableFrom v="4.0.57"/>@@ -13,19 +13,19 @@ Calculate whether the text exceeds the box and wraps within the container. Only## Example```tsx twoslash-import { fillTextBox } from "@remotion/layout-utils";+import {fillTextBox} from '@remotion/layout-utils';-const fontFamily = "Arial";+const fontFamily = 'Arial';const fontSize = 12;-const box = fillTextBox({ maxLines: 4, maxBoxWidth: 100 });-box.add({ text: "Hello", fontFamily, fontSize }); // {exceedsBox: false, newLine: false}-box.add({ text: "World!", fontFamily, fontSize }); // {exceedsBox: false, newLine: false}+const box = fillTextBox({maxLines: 4, maxBoxWidth: 100});+box.add({text: 'Hello', fontFamily, fontSize}); // {exceedsBox: false, newLine: false}+box.add({text: 'World!', fontFamily, fontSize}); // {exceedsBox: false, newLine: false}// Doesn't fit on the previous line anymore-box.add({ text: "How", fontFamily, fontSize }); // {exceedsBox: false, newLine: true}+box.add({text: 'How', fontFamily, fontSize}); // {exceedsBox: false, newLine: true}// ...// Doesn't fix in the box anymore-box.add({ text: "the end", fontFamily, fontSize }); // {exceedsBox: true, newLine: false}+box.add({text: 'the end', fontFamily, fontSize}); // {exceedsBox: true, newLine: false}```## API@@ -103,7 +103,7 @@ Additional CSS properties that affect the layout of the text.The add method returns an object with two properties:- `exceedsBox`:- _Boolean_, whether adding the word would cause the text to exceed the width of the box.+ _Boolean_, whether adding the word would cause the text to exceed the maximum lines of the box.- `newLine`:_Boolean_, whether adding the word would require starting a new line in the text box.