New Textbox Component (#2718)
* Adding textbox with no props * Fixing namings and adding shape style * simplify usage * Fix linting issues * Re-name demo * Use new shape authoring style * Add tests Simplify API * Add better types for styles * Add more options to TextBox and add documentation --------- Co-authored-by: zohar11 <zohar@sumit-ai.com> Co-authored-by: Dolan <dolan_miu@hotmail.com>
This commit is contained in:
committed by
GitHub
parent
c6bb255641
commit
3654eb0800
8
src/file/textbox/texbox-content/textbox-content.ts
Normal file
8
src/file/textbox/texbox-content/textbox-content.ts
Normal file
@ -0,0 +1,8 @@
|
||||
import { ParagraphChild } from "@file/paragraph";
|
||||
import { BuilderElement, XmlComponent } from "@file/xml-components";
|
||||
|
||||
export const createTextboxContent = ({ children = [] }: { readonly children?: readonly ParagraphChild[] }): XmlComponent =>
|
||||
new BuilderElement<{ readonly style?: string }>({
|
||||
name: "w:txbxContent",
|
||||
children: children as readonly XmlComponent[],
|
||||
});
|
Reference in New Issue
Block a user