1 parent 226729c commit 64309ceCopy full SHA for 64309ce
1 file changed
s/timeline/sugar/o.ts
@@ -114,13 +114,17 @@ export class O {
114
return item
115
}
116
117
- text = (content: string): Item.Text => {
+ text = (content: string, styles?: TextStyleOptions): Item.Text => {
118
const item = {
119
id: this.#getId(),
120
content,
121
kind: Kind.Text,
122
duration: 2000
123
} as Item.Text
124
+
125
+ if(styles)
126
+ item.styleId = this.textStyle(styles).id
127
128
this.register(item)
129
130
0 commit comments